Added `liftEither` for lifting Either into MonadError
authorElvishJerricco <elvishjerricco@gmail.com>
Fri, 8 Jul 2016 16:48:14 +0000 (12:48 -0400)
committerElvishJerricco <elvishjerricco@gmail.com>
Fri, 8 Jul 2016 16:48:14 +0000 (12:48 -0400)
commite337fb5c03c68f4027377af4cf47cc3c046a1a1b
tree0d5c289a237c3037e0331b3479ce8bcfdc291e7b
parentca7fdeb8285a56e340becfec8a41a9d346971592
Added `liftEither` for lifting Either into MonadError

Lifts an @'Either' e@ into any @'MonadError' e@.

> do { val <- liftEither =<< action1; action2 }

where @action1@ returns an 'Either' to represent errors.
Control/Monad/Error/Class.hs
Control/Monad/Except.hs