
29 Dec
2013
29 Dec
'13
2:06 p.m.
On Sun, Dec 29, 2013 at 06:50:15PM +0100, Hans Höglund wrote:
According to [1], Wrap/Compose does indeed have a Monad instance terms of traverse (here called 'swap'). As far as I understand the paper includes a proof that all the Monad laws holds for such as composition
[1]: http://web.cecs.pdx.edu/~mpj/pubs/RR-1004.pdf, page 9
Careful, they mention in Section 6.4 that "this construction only yields a composite monad if m has a certain commutativity property". This is the same reason that 'ListT m' is not a monad unless 'm' is commutative. What is your use case for these combinators? Perhaps you are using them exactly in a commutative case. Tom