
On Mon, May 12, 2008 at 6:51 AM, sam lee
Hi.
I want to compose two monads to build another monad where computations of the two monads can be used inside.
Twan's suggestion seems like a natural way to continue with the existing code you have described (based on monad transformers). If you would like to understand this issue in some depth, I recommend the following paper which presents a general way to combine two monads that is not biased towards having one "contained" in the other. - Composing monads using coproducts. C L=FCth, N Ghani. ICFP 2002. - http://www.mcs.le.ac.uk/~ng13/papers/icfp02.ps.gz I just tried it out the other day, so if you'll excuse the self-promotion here is a demonstration http://www.kennknowles.com/blog/2008/05/10/debugging-with-open-recursion-mix... - Kenn