packages feed

polysemy-resume 0.7.0.0 → 0.8.0.0

raw patch · 8 files changed

+30/−82 lines, 8 filesdep ~basedep ~incipit-coredep ~polysemy-testPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, incipit-core, polysemy-test, tasty

API changes (from Hackage documentation)

+ Polysemy.Resume: stopToErrorIO :: forall err r a. Exception (StopExc err) => Members [Error err, Final IO] r => Sem (Stop err : r) a -> Sem r a
- Polysemy.Resume: stop :: forall e_a4mD r_a5Bd a_a4mF. Member (Stop e_a4mD) r_a5Bd => e_a4mD -> Sem r_a5Bd a_a4mF
+ Polysemy.Resume: stop :: forall e_a4vW r_a5Mq a_a4vY. Member (Stop e_a4vW) r_a5Mq => e_a4vW -> Sem r_a5Mq a_a4vY
- Polysemy.Resume.Effect.Stop: stop :: forall e_a4mD r_a5Bd a_a4mF. Member (Stop e_a4mD) r_a5Bd => e_a4mD -> Sem r_a5Bd a_a4mF
+ Polysemy.Resume.Effect.Stop: stop :: forall e_a4vW r_a5Mq a_a4vY. Member (Stop e_a4vW) r_a5Mq => e_a4vW -> Sem r_a5Mq a_a4vY

Files

changelog.md view
@@ -1,4 +1,6 @@-# Unreleased+# 0.8.0.0++* Export `stopToErrorIO`.  # 0.7.0.0 
lib/Polysemy/Resume.hs view
@@ -146,6 +146,7 @@   stopOnError,   stopOnErrorWith,   stopToError,+  stopToErrorIO,   stopToErrorWith,   stopToIOFinal,   stopTryAny,@@ -171,7 +172,7 @@ --   Boom { unBoom :: Text } --   | --   Bang { unBang :: Int }---   deriving (Eq, Show)+--   deriving stock (Eq, Show) -- -- interpretStopper :: --   Member (Error Boom) r =>
lib/Polysemy/Resume/Interpreter/Resumable.hs view
@@ -241,7 +241,7 @@ -- @ -- newtype Blip = --   Blip { unBlip :: Int }---   deriving (Eq, Show)+--   deriving stock (Eq, Show) -- -- bangOnly :: Boom -> Either Text Blip -- bangOnly = \\case
lib/Polysemy/Resume/Interpreter/Scoped.hs view
@@ -13,7 +13,6 @@ import Polysemy.Internal.Tactics (liftT) import Polysemy.Internal.Union (Weaving (Weaving), injWeaving, injectMembership, weave) import Polysemy.Opaque (Opaque (Opaque))-import Polysemy.Scoped (runScopedNew)  import Polysemy.Resume.Effect.Resumable (Resumable (Resumable), type (!!)) import Polysemy.Resume.Effect.Stop (Stop)
lib/Polysemy/Resume/Interpreter/Stop.hs view
@@ -69,7 +69,7 @@   withStrategicToFinal @IO do     m' <- runS (runStopAsExcFinal sem)     s <- getInitialStateS-    pure $ either ((<$ s) . Left . unStopExc) (fmap Right) <$> Base.try m'+    pure $ either ((<$ s) . Left . \ (StopExc e) -> e) (fmap Right) <$> Base.try m' {-# inline stopToIOFinal #-}  -- |Stop if the argument is 'Left', transforming the error with @f@.
polysemy-resume.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.2 --- This file has been generated from package.yaml by hpack version 0.35.0.+-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack  name:           polysemy-resume-version:        0.7.0.0+version:        0.8.0.0 synopsis:       Polysemy error tracking description:    See https://hackage.haskell.org/package/polysemy-resume/docs/Polysemy-Resume.html category:       Error@@ -13,13 +13,13 @@ bug-reports:    https://github.com/tek/polysemy-resume/issues author:         Torsten Schmits maintainer:     hackage@tryp.io-copyright:      2022 Torsten Schmits+copyright:      2023 Torsten Schmits license:        BSD-2-Clause-Patent license-file:   LICENSE build-type:     Simple extra-source-files:-    changelog.md     readme.md+    changelog.md  source-repository head   type: git@@ -39,78 +39,51 @@   default-extensions:       AllowAmbiguousTypes       ApplicativeDo-      BangPatterns-      BinaryLiterals       BlockArguments-      ConstraintKinds       DataKinds       DefaultSignatures       DeriveAnyClass-      DeriveDataTypeable-      DeriveFoldable-      DeriveFunctor-      DeriveGeneric-      DeriveLift-      DeriveTraversable       DerivingStrategies       DerivingVia       DisambiguateRecordFields-      DoAndIfThenElse       DuplicateRecordFields-      EmptyCase-      EmptyDataDecls-      ExistentialQuantification-      FlexibleContexts-      FlexibleInstances       FunctionalDependencies       GADTs-      GeneralizedNewtypeDeriving-      InstanceSigs-      KindSignatures       LambdaCase       LiberalTypeSynonyms-      MultiParamTypeClasses       MultiWayIf-      NamedFieldPuns       OverloadedLabels       OverloadedLists       OverloadedStrings       PackageImports       PartialTypeSignatures-      PatternGuards       PatternSynonyms-      PolyKinds       QuantifiedConstraints       QuasiQuotes-      RankNTypes       RecordWildCards       RecursiveDo       RoleAnnotations-      ScopedTypeVariables-      StandaloneDeriving       TemplateHaskell-      TupleSections-      TypeApplications       TypeFamilies       TypeFamilyDependencies-      TypeOperators-      TypeSynonymInstances       UndecidableInstances       UnicodeSyntax       ViewPatterns-  ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Widentities -Wunused-packages+      OverloadedRecordDot+      NoFieldSelectors+  ghc-options: -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages   build-depends:-      base >=4.12 && <5-    , incipit-core >=0.4+      base ==4.*+    , incipit-core >=0.4 && <0.6     , polysemy ==1.9.*     , transformers   mixins:       base hiding (Prelude)     , incipit-core (IncipitCore as Prelude)     , incipit-core hiding (IncipitCore)-  default-language: Haskell2010+  default-language: GHC2021 -test-suite polysemy-resume-unit+test-suite polysemy-resume-test   type: exitcode-stdio-1.0   main-is: Main.hs   other-modules:@@ -123,77 +96,50 @@   default-extensions:       AllowAmbiguousTypes       ApplicativeDo-      BangPatterns-      BinaryLiterals       BlockArguments-      ConstraintKinds       DataKinds       DefaultSignatures       DeriveAnyClass-      DeriveDataTypeable-      DeriveFoldable-      DeriveFunctor-      DeriveGeneric-      DeriveLift-      DeriveTraversable       DerivingStrategies       DerivingVia       DisambiguateRecordFields-      DoAndIfThenElse       DuplicateRecordFields-      EmptyCase-      EmptyDataDecls-      ExistentialQuantification-      FlexibleContexts-      FlexibleInstances       FunctionalDependencies       GADTs-      GeneralizedNewtypeDeriving-      InstanceSigs-      KindSignatures       LambdaCase       LiberalTypeSynonyms-      MultiParamTypeClasses       MultiWayIf-      NamedFieldPuns       OverloadedLabels       OverloadedLists       OverloadedStrings       PackageImports       PartialTypeSignatures-      PatternGuards       PatternSynonyms-      PolyKinds       QuantifiedConstraints       QuasiQuotes-      RankNTypes       RecordWildCards       RecursiveDo       RoleAnnotations-      ScopedTypeVariables-      StandaloneDeriving       TemplateHaskell-      TupleSections-      TypeApplications       TypeFamilies       TypeFamilyDependencies-      TypeOperators-      TypeSynonymInstances       UndecidableInstances       UnicodeSyntax       ViewPatterns-  ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Widentities -Wunused-packages -threaded -rtsopts -with-rtsopts=-N+      OverloadedRecordDot+      NoFieldSelectors+  ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages   build-depends:-      base >=4.12 && <5-    , incipit-core >=0.4+      base ==4.*+    , incipit-core >=0.4 && <0.6     , polysemy ==1.9.*     , polysemy-plugin >=0.4.3 && <0.5     , polysemy-resume-    , polysemy-test >=0.6+    , polysemy-test >=0.6 && <0.9     , stm-    , tasty+    , tasty ==1.4.*   mixins:       base hiding (Prelude)     , incipit-core (IncipitCore as Prelude)     , incipit-core hiding (IncipitCore)-  default-language: Haskell2010+  default-language: GHC2021
readme.md view
@@ -26,7 +26,7 @@   Boom { unBoom :: Text }   |   Bang { unBang :: Int }-  deriving (Eq, Show)+  deriving stock (Eq, Show) ```  we implement an interpreter for `Stopper` that may throw the error `Boom`, but@@ -147,7 +147,7 @@ ```haskell newtype Blip =   Blip { unBlip :: Int }-  deriving (Eq, Show)+  deriving stock (Eq, Show)  bangOnly :: Boom -> Maybe Blip bangOnly = \case
test/Polysemy/Resume/ExampleTest.hs view
@@ -21,11 +21,11 @@   Boom { unBoom :: Text }   |   Bang { unBang :: Int }-  deriving (Eq, Show)+  deriving stock (Eq, Show)  newtype Blip =   Blip { unBlip :: Int }-  deriving (Eq, Show)+  deriving stock (Eq, Show)  bangOnly :: Boom -> Maybe Blip bangOnly = \case