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

Fix interaction of operators starting with # and UnboxedSums #1063

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

amesgen
Copy link
Member

@amesgen amesgen commented Sep 1, 2023

Closes #1062

From https://downloads.haskell.org/ghc/9.6.2/docs/users_guide/exts/primitives.html:

Note that when unboxed tuples are enabled, (# is a single lexeme, so for example when using operators like # and #- you need to write ( # ) and ( #- ) rather than (#) and (#-).

It turns that this is already the case for UnboxedSums (which is implied by UnboxedTuples).

handleUnboxedSumsAndHashInteraction
| unboxedSums,
-- Qualified names do not start wth a `#`.
Unqual (occNameString -> '#' : _) <- x =
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not 100% sure if the Orig or Exact constructors of RdrName could ever be relevant here 🤔

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

@github-actions github-actions bot temporarily deployed to pull request September 4, 2023 10:26 Inactive
@mrkkrp mrkkrp merged commit 367c6b0 into master Sep 4, 2023
9 checks passed
@mrkkrp mrkkrp deleted the amesgen/issue-1062 branch September 4, 2023 15:15
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.

Cannot format operators starting with a hash when using UnboxedSums or UnboxedTuples
2 participants