[Haskell-cafe] Name for the following combinators?

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Sun Dec 29 19:06:26 UTC 2013


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


More information about the Haskell-Cafe mailing list