-
Notifications
You must be signed in to change notification settings - Fork 24
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
Misleading error message from JoinKinds #423
Comments
adamgundry
added a commit
that referenced
this issue
Jun 8, 2021
adamgundry
added a commit
that referenced
this issue
Jun 8, 2021
adamgundry
added a commit
that referenced
this issue
Jun 10, 2021
I managed to provoke this version of an error:
Even more confusing to the unsuspecting. |
This trivially reproduces the diagnostic:
With #439 I get:
which is a huge improvement. :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With 0.4 and current HEAD:
Oops! I think what is going on here is that we get a constraint
JoinKinds A_Traversal A_Lens A_Setter
which of course does not match the instanceJoinKinds A_Traversal A_Lens A_Traversal
, so the catch-all error instance fires. Ideally we would have two different errors, one for "this composition doesn't make sense" and another for "this composition makes sense, but produces an optic of a different kind to that expected by the context".The text was updated successfully, but these errors were encountered: