Remove quantified constraints in FieldGrammar#11729
Open
leana8959 wants to merge 1 commit intohaskell:masterfrom
Open
Remove quantified constraints in FieldGrammar#11729leana8959 wants to merge 1 commit intohaskell:masterfrom
leana8959 wants to merge 1 commit intohaskell:masterfrom
Conversation
4a6f208 to
2cdb355
Compare
Collaborator
Author
|
Drafting because I forgot to remove the language extension "QuantifiedConstraints". |
sheaf
approved these changes
Apr 10, 2026
Collaborator
sheaf
left a comment
There was a problem hiding this comment.
Yes, this looks fine (modulo actually removing the LANGUAGE pragma of course). I felt slightly bad for adding the quantified constraints in the first place; I agree it's not so bad to spell them out. Thanks!
2cdb355 to
c0dd136
Compare
geekosaur
approved these changes
Apr 10, 2026
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.
Previously field grammar was written with quantified constraints, this PR refactors them to concrete types (there's actually not a lot of them!). This would help the exact print project and in general make it easier to scrutinize which term is requiring which constraint.
EDIT: at the request of Jappie, here's an error caused by an application of type family on a quantified constraint when implementing exact print. Removing the quantification helps the compiler resolve this constraint.
error message
This change doesn't change behaviour or interface.