
It is well known that ListT m in transformers is not a monad unless the underlying monad is commutative. The fact that ListT is not a monad transformer is sufficient to remove it from the package, and several packages already defined their own ListT. Oughtn't we deprecate ListT or replace it by a correct one?

I'm in favor of deprecation, but opposed to removing any time soon due to
backwards compatibility concerns.
On Fri, Mar 27, 2015 at 7:03 AM Fumiaki Kinoshita
It is well known that ListT m in transformers is not a monad unless the underlying monad is commutative. The fact that ListT is not a monad transformer is sufficient to remove it from the package, and several packages already defined their own ListT.
Oughtn't we deprecate ListT or replace it by a correct one? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

On Fri, Mar 27, 2015 at 5:07 PM, Michael Snoyman
I'm in favor of deprecation, but opposed to removing any time soon due to backwards compatibility concerns.
I agree. Given that we just deprecated ErrorT (which is both more popular, and does follow the monad laws) I think there is good reason to phase out transformers' ListT as well. I've attached a patch that adds the relevant pragma. I'm not familiar with darcs so excuse me if it's messed up :) libraries list and/or Ross Paterson, do you have anything to say about this issue?
On Fri, Mar 27, 2015 at 7:03 AM Fumiaki Kinoshita
wrote: It is well known that ListT m in transformers is not a monad unless the underlying monad is commutative. The fact that ListT is not a monad transformer is sufficient to remove it from the package, and several packages already defined their own ListT.
Oughtn't we deprecate ListT or replace it by a correct one? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
-- Chris Wong https://lambda.xyz

On Fri, Mar 27, 2015 at 01:03:04PM +0900, Fumiaki Kinoshita wrote:
It is well known that ListT m in transformers is not a monad unless the underlying monad is commutative. The fact that ListT is not a monad transformer is sufficient to remove it from the package, and several packages already defined their own ListT.
Oughtn't we deprecate ListT or replace it by a correct one?
This flaw is at least documented, and it does severely limit the usefulness of ListT. Deprecation seems reasonable, but we'd need to offer a replacement first.
participants (4)
-
Chris Wong
-
Fumiaki Kinoshita
-
Michael Snoyman
-
Ross Paterson