-
Notifications
You must be signed in to change notification settings - Fork 10
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
[BUG] invalid:mat-lam on valid program using SUP enumeration #11
Comments
Another interesting thing: when running an old commit where this invalid mat lam was not happening, i got 3 results instead of 4. With the same snippet, if we print @x, we get:
Which are the 4 possible bitstrings. But when running the equality test, i get 3 results:
(this is where the current commit fails) but sill, one of the results is missing. |
Possibly related: The thing is that even a term that correctly reduces (e.g the first case) crashes the debug, which means the infinite recursion of matches is still being generated but possibly not used. Starting to investigate where this infinite recursion comes from |
The commit that breaks it is |
Printing the reduction steps of simply
Note that after the last we get the following:
Where c is referencing itself, so when we match this arm, it will keep reaching |
First reported by @developedby on commit
e3b5492b5bbc8f4fcc90944cdd93699381539ed3
when trying to run programs likebook/enum_primes.hvml
. I tried running other examples from book and basically all enum ones are failing with this bug where we getinvalid:mat-lam
in a valid program. I've reached a minimal reproducible example with:Note that here, if I use the length of bitstring as 1 (and change some bin to have length 1), everything works as expected. Debug mode fails and prints a string forever (another bug to report). So, I changed
Runtime.c
and printed the reduce calls:Which gives 2 results (0, false) before failing with invalid mat-lam.
Still investigating why and how to fix.
The text was updated successfully, but these errors were encountered: