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

Minus sign in literal patterns is deleted sometimes #733

Closed
amesgen opened this issue Aug 2, 2021 · 0 comments · Fixed by #734
Closed

Minus sign in literal patterns is deleted sometimes #733

amesgen opened this issue Aug 2, 2021 · 0 comments · Fixed by #734
Labels
bug Something isn't working

Comments

@amesgen
Copy link
Member

amesgen commented Aug 2, 2021

While working on #694, I noted that the minus sign in (negative) literal patterns is deleted sometimes. With Ormolu 0.1.4.1 (--unsafe necessary):

foo = \case - 1 -> 1

to

foo = \case 1 -> 1

and

{-# LANGUAGE NoNegativeLiterals #-}

foo = \case -1 -> 1

to

{-# LANGUAGE NoNegativeLiterals #-}

foo = \case 1 -> 1

This is due to us ignoring the third field of NPat.

@amesgen amesgen added the bug Something isn't working label Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant