
22 Jul
2010
22 Jul
'10
9:34 a.m.
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.