[Haskell] Types of when and unless in Control.Monad
malcolm.wallace at me.com
Wed Jun 6 10:56:46 CEST 2012
On Jun 06, 2012, at 08:44 AM, Andreas Abel <andreas.abel at ifi.lmu.de> wrote:
> Well, but nothing in the type system prevents you from writing
> mapM f xs >> cont
> do mapM f xs
> so you are not warned of a space leak in the common situations anyway,
At least the second form will trigger a warning in GHC (although admittedly not from the type system, but from -fwarn-unused-do-bind). It is a jolly useful warning at times.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libraries