[Haskell-cafe] instance Monad (Except err)

Martijn van Steenbergen martijn at van.steenbergen.nl
Mon May 4 05:01:21 EDT 2009


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 Applicative 
instance does. Are there any good reasons such a Monad instance 
shouldn't be defined? Does it violate any laws, for example?



More information about the Haskell-Cafe mailing list