-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add section about portability #296
base: main
Are you sure you want to change the base?
Conversation
Could you expand what platforms exactly and why they can't use TH? Isn't that a GHC bug? |
Both the JS and Wasm backend had and still have varying levels of support for TH to my knowledge. It's actively being worked on but that doesn't really help users today. A good setup for cross compilation which supports TH also remains complex to set up. So refraining from the use of TH when it's easy to do seems like a sensible approach for core libraries to me. |
Stage1 GHC can't use the internal interpreter by design: it builds objects with a different ABI than its own. So using TH splices in Core libs that need to be built with stage1 is deemed to fail. We might use the external interpreter instead but:
JS isn't even the worse here: it supports TH in Stage1 because it never uses the internal interpreter and because it has its own external interpreter that is automatically setup and used (via NodeJS). |
We should also write down the expectations that core library maintainers have of GHC HQ. |
Unfortunately, I don't have bandwidth to discuss the proposal with maintainers of core libraries and I don't feel like imposing additional obligations unilateraly (even if very reasonable ones) is healthy. The proposed obligations make sense to some boot libraries (but not to all, I understand the underlying concern, but I think it's already covered by the current text. If a boot library cannot be built by GHC bootstrapping process and fails to accept contributions rectifying the matter, then it is not in "appropriate shape" and one can appeal to CLC to fix it. core-libraries-committee/README.md Lines 79 to 84 in 7ad3ecf
|
I have added a section to the README which explains how platform portability should be a key consideration for the maintenance of core libraries.
There have been a couple of instances recently where
TemplateHaskell
has been used in core libraries which had meant they couldn't be built on some platforms. It seems helpful to just write down what the expectations are for maintainers of core libraries so they remain usable for everyone!