multi-except 0.2.1.0 → 0.3.0.0
raw patch · 3 files changed
+11/−7 lines, 3 filesdep +dlist-nonemptydep −dlistPVP ok
version bump matches the API change (PVP)
Dependencies added: dlist-nonempty
Dependencies removed: dlist
API changes (from Hackage documentation)
- Control.Applicative.MultiExcept: fromEitherPoly :: Either (DNonEmpty err) a -> MultiExcept err a
+ Control.Applicative.MultiExcept: fromEitherPoly :: Either (NonEmptyDList err) a -> MultiExcept err a
- Control.Applicative.MultiExcept: runMultiExcept :: MultiExcept err a -> Either (DNonEmpty err) a
+ Control.Applicative.MultiExcept: runMultiExcept :: MultiExcept err a -> Either (NonEmptyDList err) a
- Control.Applicative.MultiExcept: throwErrors :: forall a err. DNonEmpty err -> MultiExcept err a
+ Control.Applicative.MultiExcept: throwErrors :: forall a err. NonEmptyDList err -> MultiExcept err a
Files
- CHANGELOG.md +4/−0
- Control/Applicative/MultiExcept.hs +5/−5
- multi-except.cabal +2/−2
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for multi-except +## 0.3.0.0 -- 2021-06-06++* Switch to dlist-nonempty package+ ## 0.2.1.0 -- 2021-05-31 * Added Bifunctor instance
Control/Applicative/MultiExcept.hs view
@@ -22,16 +22,16 @@ import Data.Bifunctor import Data.Functor.Alt-import Data.DList.DNonEmpty (DNonEmpty)+import Data.DList.NonEmpty (NonEmptyDList) -- | A 'MultiExcept' is a success value, or one or more errors. data MultiExcept err a = Success a- | Errors (DNonEmpty err)+ | Errors (NonEmptyDList err) deriving (Eq, Ord, Read, Show) -- | Run the computation.-runMultiExcept :: MultiExcept err a -> Either (DNonEmpty err) a+runMultiExcept :: MultiExcept err a -> Either (NonEmptyDList err) a runMultiExcept (Errors errs) = Left errs runMultiExcept (Success a) = Right a @@ -40,7 +40,7 @@ throwError = Errors . pure -- | Throw one or more errors.-throwErrors :: forall a err. DNonEmpty err -> MultiExcept err a+throwErrors :: forall a err. NonEmptyDList err -> MultiExcept err a throwErrors = Errors -- | Embeds a value into a 'MultiExcept' context.@@ -53,7 +53,7 @@ fromEither (Right a) = Success a -- | Convert a multi-error 'Either' to a 'MultiExcept'.-fromEitherPoly :: Either (DNonEmpty err) a -> MultiExcept err a+fromEitherPoly :: Either (NonEmptyDList err) a -> MultiExcept err a fromEitherPoly (Left errs) = Errors errs fromEitherPoly (Right a) = Success a
multi-except.cabal view
@@ -1,7 +1,7 @@ cabal-version: >=1.10 name: multi-except-version: 0.2.1.0+version: 0.3.0.0 synopsis: Multiple Exceptions description: Exception type that supports reporting multiple exceptions license: MIT@@ -16,7 +16,7 @@ library exposed-modules: Control.Applicative.MultiExcept build-depends: base >=4.0 && <5- , dlist+ , dlist-nonempty , semigroupoids default-language: Haskell2010