Skip to content

Conversation

@pe200012
Copy link

@pe200012 pe200012 commented Jan 11, 2026

Resolves #8. Closes #6.

Also fixed the extraneous space in Operator.test

Copilot AI review requested due to automatic review settings January 11, 2026 17:05
Copy link

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump version to GHC 9.12?

1 participant