[project @ 2003-06-04 14:52:09 by ralf]
[packages/old-time.git] / Control / Monad / X / laws / Writer.hs
1 import Prop
2 import Control.Monad.X.WriterT
3
4 listen_return x = listen (return x) === return (x,mempty)
5 listen_bind m1 m2 = listen (m1 >>= m2) === (do (x,w1) <- listen m1
6 (y,w2) <- listen (m2 x)
7 return (y, w1 `mappend` w2))
8
9