-0.1

It's... obscure to make the instance this way.

(a,b) >>= (,) a' -- wat

Not very harmful, but obscure. (Cute trick for golfing?) I would suggest using the writer monad instead, which is the same thing, but newtyped for sanity (and tuple flipped).

-- Dan Burton


On Thu, Jul 25, 2013 at 5:18 AM, Jake McArthur <jake.mcarthur@gmail.com> wrote:

There was a proposal to add it, but it went stale. I favor adding it.

On Jul 25, 2013 7:47 AM, "Henning Thielemann" <lemming@henning-thielemann.de> wrote:

On Thu, 25 Jul 2013, Nathan van Doorn wrote:

This is a relatively simple instance, so I was surprised that I couldn't find it in base.
My proposal is to add the instance to Control.Monad.Instances, undeprecating the module.

Wasn't it already added? Nonetheless, I strongly suggest to use Control.Monad.Trans.Writer instead. To me, using a pair as a monad looks like an error not like a feature.

_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries