#4159: move Monad and MonadFix instances for Either from mtl to base

Christian Maeder Christian.Maeder at dfki.de
Thu Jul 22 07:16:20 EDT 2010

Ross Paterson schrieb:
> is already an instance in mtl, and (+ e) is used as an example is just
> about every paper on monads.

Can you give a reference for "(+ e)"? Is this the (infix) union type
constructor (to be written as :+)? If it corresponds to "Either e"
should it not be written as  "(+) e", because "(+ e)" interpreted like a
haskell section would address the second type argument (which is not
possible to address in instances)?

  data a :+ b = Left a | Right b

  instance Monad ((:+) e)

Cheers Christian

P.S. "instance Monad (:+ e)" gives a parse error

More information about the Libraries mailing list