On Jun 06, 2012, at 08:44 AM, Andreas Abel <andreas.abel@ifi.lmu.de> wrote:

Well, but nothing in the type system prevents you from writing

mapM f xs >> cont

or

do mapM f xs
     cont

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.

Regards,
    Malcolm