Skip to content

Make mtl lazier

I propose making mtl lazier. Currently the transformers force tuples to WHNF as they put them on the left of <- in do blocks. I suspect this was unintentional, and makes them less lazy than their non-transformer counterparts.

For example, the StateT monad gives every impression of intending to be lazy, but the absence of a ~ means that it isn't fully lazy. This bit me in the compression library, meaning I currently bundle a LazyStateT module that provides essentially StateT with this change. There was also a recent discussion about it on one of the mailing lists: http://www.haskell.org/pipermail/haskell-cafe/2007-January/021244.html

Deadline: 28 February 2007.

Edited by Ian Lynagh -
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information