-
Notifications
You must be signed in to change notification settings - Fork 2
Bump to 9.12.2 #9
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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`.
Resolves #8. Closes #6.
Also fixed the extraneous space in Operator.test