David Menendez wrote:
Dan Piponi wrote:
Depending on your point of view, ListT isn't broken. It correctly
transforms commutative monads into monads. The problem is that you
can't express "commutative monad" any differently from "monad" in
Haskell. And so it's been shoehorned into the wrong type class.

If desired, we could easily define a class for commutative monads, and
then state that ListT m is only a monad if m is a commutative monad.

While possible, it's not really worth it since the commutative ListT and the general ListT coincide when applied to commutative monads. In other words, the new ListT is strictly more general than the old one and thus preferred.

Regards,
apfelmus

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to