Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for GHC 9.12.2 to the retrie library. The changes involve updating dependency version bounds and adding extensive conditional compilation (CPP) guards to handle API differences between GHC versions.
Changes:
- Updated GHC and dependency version bounds in retrie.cabal to support GHC 9.12.2
- Added CPP guards throughout the codebase to handle GHC 9.12+ API changes (Fixity, Match, Pattern, Lambda, Token/annotation APIs)
- Updated CI configuration to test against GHC 9.12.2
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| retrie.cabal | Updated dependency version bounds for GHC 9.12.2 support; added GHC 9.12.2 to tested-with; removed trailing space from copyright field |
| .github/workflows/ci.yml | Added GHC 9.12.2 to test matrix with fail-fast: false |
| CHANGELOG.md | Added entry for GHC 9.12 support |
| .gitignore | Added .stack-work/ directory |
| hse/Fixity.hs | Added CPP guards for Fixity constructor changes (removed SourceText parameter in 9.12+) |
| Retrie/Subst.hs | Added CPP guards for transferEntryDP return type and HsMatchContext signature changes |
| Retrie/Rewrites/Patterns.hs | Added CPP guards for HsRecFields, pattern annotation, and mkMatch API changes |
| Retrie/Rewrites/Function.hs | Added CPP guards for m_pats accessor, pattern matching, and operator application changes |
| Retrie/Replace.hs | Changed transferAnchor to transferEpAnn function name |
| Retrie/PatternMap/Instances.hs | Added extensive CPP guards for literal patterns, lambda variants, expression patterns, pattern constructors, type variable binders, record fields, statement types, and ValBinds representation changes |
| Retrie/GHC.hs | Added CPP guards for type variable binder extraction with different APIs for 9.12+ |
| Retrie/Fixity.hs | Added CPP guards for Fixity pretty-printing (removed SourceText parameter) |
| Retrie/Expr.hs | Added extensive CPP guards for anchor handling, location construction, lambda construction with new HsLamVariant, let expressions, applications, type variables, pattern construction, pattern-to-expression conversion, precedence, and parenthesization |
| Retrie/ExactPrint/Annotated.hs | Added CPP guards for setEntryDPA signature (removed Default constraint for 9.12+) |
| Retrie/ExactPrint.hs | Added CPP guards and Monoid/Semigroup/Default instances for GHC 9.12 annotation types; updated functions for anchor/annotation transfer, comment handling, and entry delta position handling |
| Retrie/Context.hs | Added CPP guards for context updates handling Fixity without SourceText and HsLet parameter changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Removes `transferEpAnn` as its functionality is now covered by `addAllAnnsT`.
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.
Resolves #8. Closes #6.
Also fixed the extraneous space in Operator.test