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

Document GHC-12219: static forms cannot be used in splices #494

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wz1000
Copy link

@wz1000 wz1000 commented Jun 6, 2024

No description provided.

@@ -0,0 +1,15 @@
---
title: static forms cannot be used in splices
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

• 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants