Skip to content

add additional import alias for newer GHC versions#124

Merged
joel-bach merged 1 commit intomasterfrom
ghc-upgrade-fix
Nov 20, 2025
Merged

add additional import alias for newer GHC versions#124
joel-bach merged 1 commit intomasterfrom
ghc-upgrade-fix

Conversation

@joel-bach
Copy link
Copy Markdown
Member

Fix for #123

@schoettl
Copy link
Copy Markdown

The generated modules now make GHC.Internal.* available via aliases. So that the rest of the generated code can access GHC.Internal.*?

Just out of curiosity, why is this the preferred solution? Wouldn't another solution be to not access the GHC internal namespace at all and use Data.Maybe etc. instead?

@joel-bach
Copy link
Copy Markdown
Member Author

@schoettl We use template-haskell for the code generation and it seems like even if you do not access internal modules during the generation, they can still get exposed in the actually generated code. I assume this is due to the fact that template-haskell is not designed for code generation written to file but instead for ad-hoc generation during compilation where these quirks are internals of the compiler.

@schoettl
Copy link
Copy Markdown

Ah, makes sense. Thanks!

@joel-bach joel-bach merged commit 26005f4 into master Nov 20, 2025
9 checks passed
@joel-bach joel-bach deleted the ghc-upgrade-fix branch November 20, 2025 16:21
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