Open
Conversation
jespercockx
reviewed
Mar 10, 2026
| -- The arguments to equality are _a_ (level), _A_ (the type of elements), x (: A), and y (: A) | ||
| -- We want to compile x and y | ||
| let Just (_:_:x:y:_) = allApplyElims es | ||
| hsX <- compileType (unArg x) |
Member
There was a problem hiding this comment.
Since we are compiling x and y as types, should we have a check that their type A is indeed compiling to a Haskell kind?
Member
|
Thank you for the PR! I'm happy with the feature but I'm not yet convinced that it is really necessary to treat equality constraints different from other (class) constraints in the translation. In particular, I don't really see why we need new constructors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds rudimentary (but unfortunately, not very useful - at the moment) support for generating equality constraints.
Any occurrence of a non-erased propositional equality in an instance argument is treated as being an equality constraint. The following compiles as such:
The reason I say this isn't very useful yet is because you're not allowed to actually learn anything from the equality yet, due to #168.
(If the changes are okay, best to squash, as the git history isn't the cleanest)