Skip to content

Commit

Permalink
generalizeEither -> eitherToError.
Browse files Browse the repository at this point in the history
  • Loading branch information
hadronized committed Jan 17, 2015
1 parent 1d6ffa4 commit afa556e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Data/Either/Combinators.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module Data.Either.Combinators
, unlessRight
, leftToMaybe
, rightToMaybe
, generalizeEither
, eitherToError
) where

import Control.Applicative
Expand Down Expand Up @@ -306,5 +306,5 @@ rightToMaybe :: Either a b -> Maybe b
rightToMaybe = either (const Nothing) Just

-- | Generalize 'Either e' as 'MonadError e m'.
generalizeEither :: (MonadError e m) => Either e a -> m a
generalizeEither = either throwError return
eitherToError :: (MonadError e m) => Either e a -> m a
eitherToError = either throwError return

0 comments on commit afa556e

Please sign in to comment.