
G'day all.
On Thu, May 15, 2003 at 11:12:32AM -0700, Iavor Diatchki wrote:
given that, we should either remove the #ListT# transformer from the monad library, or (perhaps better) put a big warning that it should only be used with commutative monads.
My personal choice would be to dump it and replace it with Ralf Hinze's backtracking monad transformer, which _does_ preserve commutativity. If someone with checkin rights is listening in, I'd be very happy to contribute my implementation, which is about as stable as it's ever going to be.
hello, in my earlier post i made a silly mistake -- i said that #ErrorT# preserves commutativity, which is definately wrong throwError 1 >> throwError 2 /= throwError 2 >> throwError 1 (what was i thinking :-) Andrew J Bromage wrote: that's an interesting idea, i'd forgotten about that one. by the way it is not that the list monad transformer does not preserve commutativity, it simply does not produce a monad when transforming a non-commutative monad. bye iavor