Control.Monad proposal: Add whenJust

Ben Millwood haskell at benmachine.co.uk
Sat May 11 19:15:53 CEST 2013


On Sat, May 11, 2013 at 01:10:10AM +0200, Henning Thielemann wrote:
>I have suggested such rules to Neil Mitchell but he hesitated to 
>recommend functions from Data.Foldable module.

Maybe what we really need to do is work out why Data.Foldable is so 
maligned, and sort out the import conflicts so it's easier to use.

I think with the lists-of-length-at-most-1 metaphor, using for_ with 
Maybe is perfectly logical (if you like, imagine an implicit maybeToList 
in there).



More information about the Libraries mailing list