Skip to content

Conversation

@toku-sa-n
Copy link
Collaborator

@toku-sa-n toku-sa-n commented Feb 27, 2024

Description of the PR

This PR defines Module as a replacement for HsModule.

The purpose is to mitigate the burden caused by GHC's version changes. GHC changes the structure of its AST when it's updated, which almost always requires us to modify our pretty-printing functions, including locating CPP blocks, duplicating existing pretty-printing functions, and fixing many compile errors. Also, when we want to change the pretty-printing style, we need to modify multiple CPP blocks for just a change. By creating HIndent's own AST, we can keep up with the latest GHC with less bothersome because we only need to update our AST while we can change the printing style more easily as we don't need CPP pragmas in Pretty instances of our AST types.

This PR is complete in the sense that it doesn't change any existing behaviors, but is incomplete because we need to replace the other AST types from GHC. Still, I chose to create multiple small PRs for easier reviewing.

Checklist

@toku-sa-n toku-sa-n mentioned this pull request Apr 15, 2024
2 tasks
This was referenced May 4, 2024
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.

2 participants