Strictness of modify in Control.Monad.State.Strict

Ryan Newton rrnewton at
Sat Sep 29 16:43:43 CEST 2012

I agree. I think part of the issue is that one is in "imperative mindset" when writing this code. For me that seems to make it easier to miss "modify" space leaks in a forM loop, than if I were writing pure code with a fold. 

Sent from my cell phone

On Sep 28, 2012, at 3:19 PM, Evan Laforge <qdunkan at> wrote:

>> In general it would be nice if the notion of strictness were better
>> addressed in the major libraries' documentation. It's a nuanced
>> issue which is not fully captured by a ".Lazy" or ".Strict" in the
>> module name.
> I agree.  I too wasted a significant amount of time hunting down space
> leaks with were fixed by adding a modify' function.  If it had been in
> the State module along with documentation about the implications, I
> could have saved time.
> _______________________________________________
> Libraries mailing list
> Libraries at

More information about the Libraries mailing list