either 4.3.2.1 → 4.3.3
raw patch · 3 files changed
+11/−1 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.Either.Combinators: eitherToError :: MonadError e m => Either e a -> m a
Files
- CHANGELOG.markdown +4/−0
- either.cabal +1/−1
- src/Data/Either/Combinators.hs +6/−0
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+4.3.3+-----+* Added `eitherToError`.+ 4.3.2.1 ------- * Support `monad-control` 1.0
either.cabal view
@@ -1,6 +1,6 @@ name: either category: Control, Monads-version: 4.3.2.1+version: 4.3.3 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE
src/Data/Either/Combinators.hs view
@@ -32,9 +32,11 @@ , unlessRight , leftToMaybe , rightToMaybe+ , eitherToError ) where import Control.Applicative+import Control.Monad.Error.Class ( MonadError(throwError) ) -- --------------------------------------------------------------------------- -- Functions over Either@@ -302,3 +304,7 @@ -- Just 12 rightToMaybe :: Either a b -> Maybe b rightToMaybe = either (const Nothing) Just++-- | Generalize 'Either e' as 'MonadError e m'.+eitherToError :: (MonadError e m) => Either e a -> m a+eitherToError = either throwError return