-
Notifications
You must be signed in to change notification settings - Fork 119
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
panic with message "Unexpected value in tuple selection" #607
Comments
Well, that one is already fixed, so it can't be that :-) More seriously, when I run it there is an extra line in the panic that's not visible above:
It would appear that we are trying to project from a polymorphic value, which should never happen, hence the panic. Btw, it also happens if you make the definition at the top level of a module, so there's a bug in the handling of recursive pattern bindings, not just the command line. The equation above is translated to something like:
So likely what happened is that Here is the actual output of the translation:
The bug is that in the definition of |
I tried a slightly simplified example
So the NoPat pass expands the original declaration into three new ones, and the |
My latest idea is that the type checker goes wrong when it is given a recursive set of bindings where some are mono and others are not. For example, with
Here, |
Main> let (x,y)=(0,x+1)
[warning] at :1:5--1:18:
Defaulting the type of '::y' to [1]
Main> x
cryptol: You have encountered a bug in Cryptol's implementation.
*** Please create an issue at https://github.com/GaloisInc/cryptol/issues
%< ---------------------------------------------------
Revision: UNKNOWN
Branch: UNKNOWN
Location: [Eval] Cryptol.Eval.evalSel
Message: Unexpected value in tuple selection
CallStack (from HasCallStack):
panic, called at src/Cryptol/Utils/Panic.hs:21:9 in cryptol-2.7.0-B2fyIqbCot160gS325LyBV:Cryptol.Utils.Panic
panic, called at src/Cryptol/Eval/Monad.hs:186:17 in cryptol-2.7.0-B2fyIqbCot160gS325LyBV:Cryptol.Eval.Monad
evalPanic, called at src/Cryptol/Eval.hs:431:29 in cryptol-2.7.0-B2fyIqbCot160gS325LyBV:Cryptol.Eval
%< ---------------------------------------------------
The text was updated successfully, but these errors were encountered: