[Haskell-beginners] Handling a MonadError
Christopher Howard
christopher.howard at frigidcode.com
Mon May 30 21:35:50 CEST 2011
Related question: Could you explain the typeclass definition for
MonadError to me?:
class (Monad m) => MonadError e m | m -> e where
throwError :: e -> m a
catchError :: m a -> (e -> m a) -> m a
More specifically: Why is there a pipe symbol followed by what looks
like a function definition in the "class" line? The typeclass
definitions from the tutorials I went through were simpler, like:
class BasicEq a where
isEqual :: a -> a -> Bool
--
frigidcode.com
theologia.indicium.us
More information about the Beginners
mailing list