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

Refactoring of monadic code results in code that is parenthesized erroneously #124

Closed
Aster89 opened this issue Mar 24, 2022 · 2 comments · Fixed by ndmitchell/hlint#1367

Comments

@Aster89
Copy link

Aster89 commented Mar 24, 2022

The code

f = const [] . (>>= const Nothing) . const Nothing

is refactored to

f = const [] . const Nothing <=< const Nothing

which is wrong, instead of

f = const [] . (const Nothing <=< const Nothing)

which is correct.

Originally filed the report on HLS.

@zliu41
Copy link
Collaborator

zliu41 commented Mar 26, 2022

Thanks for reporting the bug, @Aster89. I believe this should be taken care of on the HLint side, so I opened ndmitchell/hlint#1364.

@zliu41
Copy link
Collaborator

zliu41 commented Mar 28, 2022

The fix has been merged into HLint master.

@zliu41 zliu41 closed this as completed Mar 28, 2022
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 a pull request may close this issue.

2 participants