Document GHC-12219: static forms cannot be used in splices#494
Open
wz1000 wants to merge 1 commit intohaskellfoundation:mainfrom
Open
Document GHC-12219: static forms cannot be used in splices#494wz1000 wants to merge 1 commit intohaskellfoundation:mainfrom
wz1000 wants to merge 1 commit intohaskellfoundation:mainfrom
Conversation
Bodigrim
reviewed
Feb 2, 2025
| @@ -0,0 +1,15 @@ | |||
| --- | |||
| title: static forms cannot be used in splices | |||
Collaborator
There was a problem hiding this comment.
Even while GHC itself starts the error message from lower case, I'd prefer to keep titles in title case.
Suggested change
| title: static forms cannot be used in splices | |
| title: Static forms cannot be used in splices |
Bodigrim
reviewed
Feb 2, 2025
| • In the untyped splice: $(lift (show $ staticKey $ static 'a')) | ||
| ``` | ||
|
|
||
| GHC does not support using a static form in a splice, i.e. obtaining a reference |
Collaborator
There was a problem hiding this comment.
I appreciate that it's tedious, but IMHO it's worth to provide readers with more context, especially when it comes to rare features of the language. Those who are already in the know what is a static form and what is a splice are not our target audience. For someone who encountered the error just by making a typo it would help to know which language extensions are involved and have a link to the GHC manual at ready.
I'd suggest to spell out "TemplateHaskell splices" in full, to make it unambiguous.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.