-
Notifications
You must be signed in to change notification settings - Fork 7
Updating HLint to require using 'pure' instead of 'return' #720
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
base: main
Are you sure you want to change the base?
Conversation
f770bfb
to
9f384c5
Compare
9f384c5
to
8be794c
Compare
Would |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but it might be best to not merge this until just before we release version 1.0.0, so that there's fewer PRs impacted by this.
I think the proposal is to make return a top level function rather than a member of the Monad class. The reason to prioritise pure over return would be to not require a Monad constraint where it isn't needed. The proposal would take care of this by removing the Monad constraint from return. However, I do support using pure over return for consistency reasons. |
I'm of a similar mind.
Agreed, let's let this sit for a bit and revisit it just before or just after cutting the |
Let's do just before. |
My preference as well 👍. |
Update the
.hlint.yaml
to require usingpure
instead ofreturn
. This change is intended to future-proof the code-base for the "Monad of No Return" proposal.The changes touch a lot of the code-base and if the churn is deemed too high for negligible benefits, we can delete this pull request.