
HI Wolfgang,
The code is from GHC source
ghc-6.4.1/libraries/monads/Monad/StateT.hs, am I looking at the wrong
place?
I found the thread discussing "Monad strictness", where is your StateT defined?
But it is still not clear to me why lazy pattern is used here. Any ideas?
Thanks,
Fan
On 11/23/05, Wolfgang Jeltsch
Am Mittwoch, 23. November 2005 10:03 schrieb Fan Wu:
[...]
I'm puzzled over this line:
~(a,s') <- lift (mplus m1' m2')
Why is this line in Monad.State.StateT? Recently, we discussed that StateT does *not* use a lazy pattern here but that it should be changed to using one. So where did you see this lazy pattern?
[...]
Best wishes, Wolfgang _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe