from-sum 0.1.1.0 → 0.1.2.0
raw patch · 2 files changed
+11/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Control.FromSum: fromEitherOr :: Either e a -> (e -> a) -> a
+ Control.FromSum: fromMaybeOr :: Maybe a -> a -> a
Files
- from-sum.cabal +1/−1
- src/Control/FromSum.hs +10/−0
from-sum.cabal view
@@ -1,5 +1,5 @@ name: from-sum-version: 0.1.1.0+version: 0.1.2.0 synopsis: Canonical fromMaybeM and fromEitherM functions. description: Please see README.md homepage: https://github.com/cdepillabout/from-sum
src/Control/FromSum.hs view
@@ -24,7 +24,9 @@ , fromMaybeOrMM -- * Completely non-monadic functions , fromEither+ , fromEitherOr , fromMaybe+ , fromMaybeOr ) where #if __GLASGOW_HASKELL__ < 710 -- We don't need this import for GHC 7.10 as it exports all required functions@@ -146,3 +148,11 @@ fromEither :: (e -> a) -> Either e a -> a fromEither f (Left e) = f e fromEither _ (Right a) = a++-- | A 'flip'ed version of 'fromEither'.+fromEitherOr :: Either e a -> (e -> a) -> a+fromEitherOr = flip fromEither++-- | A 'flip'ed version of 'fromMaybe'.+fromMaybeOr :: Maybe a -> a -> a+fromMaybeOr = flip fromMaybe