Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nonempty_maybe_improper_list explodes #120

Closed
orsinium opened this issue May 30, 2022 · 5 comments · Fixed by #121
Closed

nonempty_maybe_improper_list explodes #120

orsinium opened this issue May 30, 2022 · 5 comments · Fixed by #121
Labels
bug Something isn't working

Comments

@orsinium
Copy link
Contributor

iex(1)> alias TypeCheck.Builtin, as: B
TypeCheck.Builtin
iex(2)> B.nonempty_maybe_improper_list(B.any(), B.any())
[1]    104510 killed     iex -S mix

image

@Qqwy Qqwy added the bug Something isn't working label May 30, 2022
@Qqwy
Copy link
Owner

Qqwy commented May 30, 2022

Curious! Time to investigate 💪 .

@orsinium
Copy link
Contributor Author

Checked on the latest master (f4047f35c858039183d77ab8509e79816efee63a), also fails. it just runs out of RAM.

@orsinium
Copy link
Contributor Author

Regular maybe_improper_list is fine.

@Qqwy
Copy link
Owner

Qqwy commented May 30, 2022

The problem is unbounded recursion. I'm using nonempty_maybe_improper_list in the body of nonempty_maybe_improper_list but this should be maybe_improper_list.

@Qqwy
Copy link
Owner

Qqwy commented May 30, 2022

I will push a PR with a fix shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants