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

Ross Paterson ross at soi.city.ac.uk
Thu Jul 22 09:34:50 EDT 2010


On Thu, Jul 22, 2010 at 01:16:20PM +0200, Christian Maeder wrote:
> 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)?

True, most papers use M a = a + E, but we have to flip the arguments
to write an instance in Haskell.


More information about the Libraries mailing list