-
Notifications
You must be signed in to change notification settings - Fork 123
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
Duplicating a function causes failure #557
Comments
TLDR: The issue here is that Here are the types of the two functions, renaming the one to avoid confusion:
Clearly there is only one possible way to solve Now, in this case one could argue that there is only possible "reasonable" solution, and Cryptol should pick Perhaps some sort of defaulting, if there is only one possible variable around, and choosing it would solve everything. |
I discussed this issue with @yav, and we identified a case where the "Failed to validate user-specified signature" error message is particularly misleading. If type checking results in one or more unsolved constraints, which also include one or more unbound unification variables, then we have a situation where the constraints might be solvable if we only knew how to instantiate the variables. In this case, the error message should not say that the type checking definitely "failed"; instead it should highlight the remaining unification variables, possibly suggesting that the user could add explicit type applications or type signatures. |
I've updated the error messages to make it a bit more obvious what went wrong:
|
Is there anything left to do here, or should we close the ticket? |
With the improved error messages, I think we're done here. |
perm
works fine.perm2
fails to type check. Maybe related to #389 ?However, changing the
lg2 m
tom
removes the issue.The text was updated successfully, but these errors were encountered: