Re: [Haskell-cafe] instance Monad (Except err)

2009-05-06 Thread Tillmann Rendel
Hi, Martijn van Steenbergen wrote: Mr. McBride and mr. Paterson define in their Applicative paper: data Except e a = OK a | Failed e instance Monoid e => Applicative (Except e) where ... Sometimes I'd still like to use >>= on Excepts but this "feels" wrong somehow, because it doesn't use mo

Re: [Haskell-cafe] instance Monad (Except err)

2009-05-04 Thread Tony Morris
Yes, however, ap is not equal to (<*>) for the given Applicative. I don't believe such a monad is possible. Neil Brown wrote: > Martijn van Steenbergen wrote: >> Hello, >> >> Mr. McBride and mr. Paterson define in their Applicative paper: >> >>> data Except e a = OK a | Failed e >>> instance Monoi

Re: [Haskell-cafe] instance Monad (Except err)

2009-05-04 Thread Neil Brown
Martijn van Steenbergen wrote: Hello, Mr. McBride and mr. Paterson define in their Applicative paper: data Except e a = OK a | Failed e instance Monoid e => Applicative (Except e) where ... Sometimes I'd still like to use >>= on Excepts but this "feels" wrong somehow, because it doesn't use

Re: [Haskell-cafe] instance Monad (Except err)

2009-05-04 Thread Tony Morris
Martijn van Steenbergen wrote: > Hello, > > Mr. McBride and mr. Paterson define in their Applicative paper: > >> data Except e a = OK a | Failed e >> instance Monoid e => Applicative (Except e) where ... > > Sometimes I'd still like to use >>= on Excepts but this "feels" wrong > somehow, because it

[Haskell-cafe] instance Monad (Except err)

2009-05-04 Thread Martijn van Steenbergen
Hello, Mr. McBride and mr. Paterson define in their Applicative paper: data Except e a = OK a | Failed e instance Monoid e => Applicative (Except e) where ... Sometimes I'd still like to use >>= on Excepts but this "feels" wrong somehow, because it doesn't use monoids nicely like the Applica