
On 24 August 2012 22:24, Stephen Tetley
Hasn't `void` recently been added to Base so that you can discard the result of any monadic action?
when True (void actionWithAnswer)
I also recall a similar discussion within the past six months on this topic, though I'm having difficulty finding it either online or in my emails :/ I believe the consensus of the previous discussion was that having functions such as your stated when_ and unless_ are dangerous in the general case due to the discarded results being implicitly ignored (same as how GHC nowadays throws warnings when statements in a do-block aren't of type m () ).
On 24 August 2012 10:12, Oren Ben-Kiki
wrote: [CUT] That is, I agree that results shouldn't be discarded "by default", but it should be easy to get rid of them if they are unneeded.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com