[Haskell-beginners] Handling a MonadError
Stephen Tetley
stephen.tetley at gmail.com
Mon May 30 23:17:00 CEST 2011
On 30 May 2011 20:35, Christopher Howard
<christopher.howard at frigidcode.com> wrote:
> 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?
It is a functional dependency.
Generally you can read it as "m uniquely determines e".
More information about the Beginners
mailing list