Combining distinct-thread state monads?

Daan Leijen daanleijen at xs4all.nl
Thu Jan 8 15:17:50 EST 2004


Hi Mark,

> The state transformer approach seems to have
> advantageous in that it provides a framework for
> building new monads from old, and accessing the
> components.  One disadvantage is that it lacks
> symmetry in that one monad is arbitrarily chosen
> to sit inside the other.

You may want to read "composing monads" by Mark Jones
and Luc Duponcheel. It specifies precisely what kind
of laws should hold before monads can be composed.
(and indeed, it also shows that not all monads are
symetrical and can be arbitrarily composed!)

<http://www.cse.ogi.edu/~mpj/pubs/composing.html>

All the best,
  Daan Leijen.



More information about the Haskell mailing list