
26 Oct
2014
26 Oct
'14
5:34 p.m.
Dear Haskellers, I'm confused with the behaviour of a lazy state monad when combined with an IO monad. Look at this: ghci> Control.Monad.State.Lazy.evalState (head `fmap` mapM return (1:undefined)) 0 1 ghci> Control.Monad.State.Lazy.evalStateT (head `fmap` mapM return (1:undefined)) 0 *** Exception: Prelude.undefined I would have expected the second case to behave identically to the first case. Why is this not the case? Cheers, Jan