Skip to content
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

GHC 9.8 support #134

Merged
merged 16 commits into from
Dec 19, 2023
Merged

GHC 9.8 support #134

merged 16 commits into from
Dec 19, 2023

Conversation

alanz
Copy link
Owner

@alanz alanz commented Dec 19, 2023

No description provided.

alanz added 16 commits December 19, 2023 18:56
Compiles, passes most tests.

Cases: 3347  Tried: 3347  Errors: 6  Failures: 3
WIP

Using the approach from ghc-exactprint master, print the comment form,
not the Haddock docs embedded in the AST.
We get synthesised DocD top level decls, and must filter them out when
printing, otherwise we process the anchor in the location, messing
with comments belonging to the end of the prior decl.
It is always calld with layout as True, so remove the parameter
Needs an update to WarningTxt for WarningCategory.
MR coming.
Three new cases to investigate.

70k/220k files still to check
Works with ghc-9.8.1 alpha4

It is the only remaining failure, after processing 217k files
https://gitlab.haskell.org/ghc/ghc/-/issues/23984

After parsing, fix up the header comments by looking for a `where`
keyword and moving any comments in the first declaration that precede
it into the header comments.

This only affects a specific scenario where
- There are comments in the lines before the module header
- There is a comment on the same line as the 'where', preceding it
- There is a decl immediately following the line with the comment and
  'where' token
And add a test for module header comments without a space.
@alanz alanz mentioned this pull request Dec 19, 2023
@alanz alanz merged commit 7f34ddc into master Dec 19, 2023
2 checks passed
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.

1 participant