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
Suggest less liftM #132
Comments
I love the idea of deprecating |
True - if we have the rule to avoid liftM, we don't need to match on it - I hadn't thought of that. |
ndmitchell
added a commit
that referenced
this issue
Jan 22, 2016
All done now, one hint to replace liftM with fmap, and all other liftM hints now suggest fmap. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From #131 @watashi asked "In there any plan for hlint to suggest fmap or <$> instead of liftM in future? As ghc 7.10 is released, Functor is a supperclass of Monad now according to Functor-Applicative-Monad Proposal". I replied:
Yes, I'd be happy to do that now (specifically a ticket for me to do in future, or a patch from someone else doing it now). Taking a quick look, where I have patterns that match on liftM they should probably match on both fmap and <$> as well as liftM. For the liftM fusion rule, there should probably be fmap and <$> versions which stick to producing the same. Where I suggest something it should never be liftM. The only debate is if to suggest liftM ==> fmap, and I think my inclination is that's now a good idea too - I certainly never use liftM.
The text was updated successfully, but these errors were encountered: