packages feed

chorale 0.1.7 → 0.1.8

raw patch · 2 files changed

+13/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Chorale.Common: fromLeftMay :: Either a b -> Maybe a
+ Chorale.Common: fromRightMay :: Either a b -> Maybe b

Files

chorale.cabal view
@@ -1,5 +1,5 @@ name:           chorale-version:        0.1.7+version:        0.1.8 homepage:       https://github.com/mocnik-science/chorale bug-reports:    https://github.com/mocnik-science/chorale/issues synopsis:       A module containing basic functions that the prelude does not offer
src/Chorale/Common.hs view
@@ -165,6 +165,8 @@     mapRight,     fromLeft,     fromRight,+    fromLeftMay,+    fromRightMay,     Either3(..)) where  import Control.Monad@@ -838,6 +840,16 @@ fromRight :: Either a b -> b fromRight (Right b) = b fromRight _ = error "Error: fromRight on Left"++-- | safe variant of 'fromLeft'+fromLeftMay :: Either a b -> Maybe a+fromLeftMay (Left a) = Just a+fromLeftMay _ = Nothing++-- | safe variant of 'fromRight'+fromRightMay :: Either a b -> Maybe b+fromRightMay (Right b) = Just b+fromRightMay _ = Nothing  -- | 'Either'-like type for 3 values data Either3 a b c = E1 a | E2 b | E3 c