-
Notifications
You must be signed in to change notification settings - Fork 139
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
Improve the environment of error messages #2346
Comments
Hmm i thought that code collected all the relevant binding - I think ANF things are perhaps aggressively getting filtered out to keep the environment small? See the “tidyXYZ” functions… |
I can confirm that tidyError seems to be dropping the |
The first time, it is discarded in sliceREnv. The second time, it is discarded in isInline' because it is considered a singleton |
With #2350 the error message shows as:
|
This is much better, thanks so much! |
One deficiency of error messages in LH is that they don't contain all of the relevant bindings to understand the error.
Suppose we are trying to verify
Liquid Haskell says:
If we look at constraint 12 in the dump
./.liquid/Test.hs.fq.prettified
we find:Note how
_lq_anf$
is missing in the error message, yet it gives the useful fact that?a == []
(which is my translation oflq_tmp$x = ds_d22E
andlq_tmp$x = GHC.Types.$91$$93$
). With this, it should be clear that the SMT solver isn't able to solveTest.append [] [] == []
, and that such hypothesis needs to be brought via PLE or a manual proof._lq_anf$
, and any other binding whose predicate mentions variables "relevant" to the constraint should be printed in the error message. The code that collects the bindings for the file dump is here. This issue is about plugging it, or otherwise doing something similar in the error message.The text was updated successfully, but these errors were encountered: