Skip to content

Use appendMissingPats from ghc-exactprint - #5080

Merged
Aster89 merged 4 commits into
haskell:masterfrom
Aster89:move-appendMissingPatterns-to-ghc-exactprint
Oct 14, 2026
Merged

Aster89 merged 4 commits into
haskell:masterfrom
Aster89:move-appendMissingPatterns-to-ghc-exactprint

Conversation

@Aster89

@Aster89 Aster89 commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Tested against alanz/ghc-exactprint#148 locally on my machine. It builds and case-split plugin's tests pass.

This PR is a draft because alanz/ghc-exactprint#148 needs to be merged in first.

Fix #5077


This PR includes a commit authored by @simonhorlick and generated with Claude Code's assistance.

I've added a fixup commit to remove some (seemingly, according to the tests) redundant code.

@Aster89
Aster89 requested a review from fendor as a code owner September 7, 2026 18:02
@Aster89 Aster89 self-assigned this Sep 7, 2026
@Aster89
Aster89 marked this pull request as draft September 7, 2026 18:02
@Aster89
Aster89 force-pushed the move-appendMissingPatterns-to-ghc-exactprint branch from a552f53 to cca05a6 Compare September 30, 2026 09:08
@Aster89
Aster89 marked this pull request as ready for review September 30, 2026 09:10
@Aster89
Aster89 marked this pull request as draft September 30, 2026 09:21
@Aster89 Aster89 added the status: blocked Not actionable, because blocked by upstream/GHC etc. label Sep 30, 2026
@Aster89
Aster89 force-pushed the move-appendMissingPatterns-to-ghc-exactprint branch from cca05a6 to a6f5b54 Compare October 9, 2026 08:02
@Aster89
Aster89 marked this pull request as ready for review October 9, 2026 08:03
@Aster89 Aster89 removed the status: blocked Not actionable, because blocked by upstream/GHC etc. label Oct 9, 2026
@Aster89
Aster89 requested a review from michaelpj as a code owner October 9, 2026 13:44
@Aster89
Aster89 force-pushed the move-appendMissingPatterns-to-ghc-exactprint branch from 7bc0e8d to c9816dd Compare October 10, 2026 08:21
@Aster89

Aster89 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

The breakage is uniquely due to the new version of ghc-exactprint, and specifically to alanz/ghc-exactprint#156, which has changed something in a backward incompatible way.

Looking into it 😄

Oh, well, things seem to be easier than I thought, according to what @simonhorlick wrote in alanz/ghc-exactprint#156:

The change to GADTs will require a one-line fix to HLS as the GADT plugin constructs a decl that would be too indented after this is applied.

@simonhorlick

Copy link
Copy Markdown
Collaborator

@Aster89 hey, I'm sorry I'll raise a PR for this now.

@simonhorlick

Copy link
Copy Markdown
Collaborator

@Aster89 I have raised PR #5138 that fixes the DifferentLine column logic in the gadt plugin to match what ghc-exactprint does.

@Aster89
Aster89 force-pushed the move-appendMissingPatterns-to-ghc-exactprint branch from c9816dd to 1efd70c Compare October 12, 2026 11:43
@Aster89
Aster89 requested a review from July541 as a code owner October 12, 2026 16:05
@Aster89
Aster89 force-pushed the move-appendMissingPatterns-to-ghc-exactprint branch from 04a41af to 97a5b0d Compare October 13, 2026 16:16
Aster89 and others added 4 commits October 13, 2026 19:01
ghc-exactprint >= 1.14.3 sets a layout column at the first constructor,
so the ones after it take a zero column delta instead of two.
@Aster89
Aster89 force-pushed the move-appendMissingPatterns-to-ghc-exactprint branch from 97a5b0d to 1f7a55c Compare October 13, 2026 17:02
@Aster89 Aster89 added the component: hls-case-split-plugin Issues related to the hls-case-split-plugin label Oct 14, 2026

@fendor fendor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, merge when you are ready

@Aster89
Aster89 merged commit 6a6895e into haskell:master Oct 14, 2026
70 of 76 checks passed
@Aster89
Aster89 deleted the move-appendMissingPatterns-to-ghc-exactprint branch October 14, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: hls-case-split-plugin Issues related to the hls-case-split-plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hls-case-split-plugin: appendMissingPats should be moved to ghc-exactprint

3 participants