packages feed

polysemy-resume 0.8.0.1 → 0.9.0.0

raw patch · 5 files changed

+65/−58 lines, 5 filesdep ~basedep ~incipit-coredep ~polysemyPVP ok

version bump matches the API change (PVP)

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

API changes (from Hackage documentation)

+ Polysemy.Resume: resumeMaybe :: forall err eff r a. Member (Resumable err eff) r => Sem (eff : r) a -> Sem r (Maybe a)
+ Polysemy.Resume.Resume: resumeMaybe :: forall err eff r a. Member (Resumable err eff) r => Sem (eff : r) a -> Sem r (Maybe a)
- Polysemy.Resume: stop :: forall e_a4vL r_a5Mf a_a4vN. Member (Stop e_a4vL) r_a5Mf => e_a4vL -> Sem r_a5Mf a_a4vN
+ Polysemy.Resume: stop :: forall e_a4EX r_a5Vr a_a4EZ. Member (Stop e_a4EX) r_a5Vr => e_a4EX -> Sem r_a5Vr a_a4EZ
- Polysemy.Resume.Effect.Stop: stop :: forall e_a4vL r_a5Mf a_a4vN. Member (Stop e_a4vL) r_a5Mf => e_a4vL -> Sem r_a5Mf a_a4vN
+ Polysemy.Resume.Effect.Stop: stop :: forall e_a4EX r_a5Vr a_a4EZ. Member (Stop e_a4EX) r_a5Vr => e_a4EX -> Sem r_a5Vr a_a4EZ

Files

changelog.md view
@@ -1,3 +1,7 @@+# 0.9.0.0++* Add `resumeMaybe`.+ # 0.8.0.0  * Export `stopToErrorIO`.
lib/Polysemy/Resume.hs view
@@ -56,6 +56,7 @@   resumeHoistErrorAs,   restop,   resumeEither,+  resumeMaybe,   resumeOr,   resumingOr,   resumeError,@@ -72,6 +73,22 @@  import Polysemy.Resume.Effect.Resumable (Resumable, type (!!)) import Polysemy.Resume.Effect.Stop (Stop (..), stop)+import Polysemy.Resume.Interpreter.Resumable (+  catchResumable,+  interceptResumable,+  interceptResumableH,+  interceptResumableUsing,+  interceptResumableUsingH,+  interpretResumable,+  interpretResumableH,+  raiseResumable,+  resumable,+  resumableError,+  resumableFor,+  resumableIO,+  resumableOr,+  runAsResumable,+  ) import Polysemy.Resume.Interpreter.Scoped (   interpretResumableScoped,   interpretResumableScopedH,@@ -92,21 +109,25 @@   interpretScopedResumableWith_,   interpretScopedResumable_,   )-import Polysemy.Resume.Interpreter.Resumable (-  catchResumable,-  interceptResumable,-  interceptResumableH,-  interceptResumableUsing,-  interceptResumableUsingH,-  interpretResumable,-  interpretResumableH,-  raiseResumable,-  resumable,-  resumableError,-  resumableFor,-  resumableIO,-  resumableOr,-  runAsResumable,+import Polysemy.Resume.Interpreter.Stop (+  mapStop,+  replaceStop,+  runStop,+  showStop,+  stopEither,+  stopEitherAs,+  stopEitherWith,+  stopNote,+  stopOnError,+  stopOnErrorWith,+  stopToError,+  stopToErrorIO,+  stopToErrorWith,+  stopToIOFinal,+  stopTryAny,+  stopTryIO,+  stopTryIOE,+  stopTryIOError,   ) import Polysemy.Resume.Resume (   restop,@@ -120,6 +141,7 @@   resumeHoistAs,   resumeHoistError,   resumeHoistErrorAs,+  resumeMaybe,   resumeOr,   resumeWith,   resume_,@@ -133,26 +155,6 @@   (!>>),   (<!),   (<<!),-  )-import Polysemy.Resume.Interpreter.Stop (-  mapStop,-  replaceStop,-  runStop,-  showStop,-  stopEither,-  stopEitherAs,-  stopEitherWith,-  stopNote,-  stopOnError,-  stopOnErrorWith,-  stopToError,-  stopToErrorIO,-  stopToErrorWith,-  stopToIOFinal,-  stopTryAny,-  stopTryIO,-  stopTryIOE,-  stopTryIOError,   )  -- $intro
lib/Polysemy/Resume/Resume.hs view
@@ -216,6 +216,15 @@ resumeEither ma =   resuming (pure . Left) (Right <$> ma) +-- | Variant of 'resume' that immediately produces an 'Maybe'.+resumeMaybe ::+  ∀ err eff r a .+  Member (Resumable err eff) r =>+  Sem (eff : r) a ->+  Sem r (Maybe a)+resumeMaybe ma =+  resuming @err (const (pure Nothing)) (Just <$> ma)+ -- | Variant of 'resume' that takes a branch for error and success. -- This allows the success branch to contain other resumptions. --
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.2.+-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack  name:           polysemy-resume-version:        0.8.0.1+version:        0.9.0.0 synopsis:       Polysemy error tracking description:    See https://hackage.haskell.org/package/polysemy-resume/docs/Polysemy-Resume.html category:       Error@@ -51,6 +51,7 @@       GADTs       LambdaCase       LiberalTypeSynonyms+      MonadComprehensions       MultiWayIf       OverloadedLabels       OverloadedLists@@ -73,10 +74,10 @@       NoFieldSelectors   ghc-options: -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages   build-depends:-      base ==4.*-    , incipit-core >=0.4 && <0.6-    , polysemy ==1.9.*-    , transformers+      base >=4.16.4.0 && <4.20+    , incipit-core >=0.4.1.0 && <0.7+    , polysemy >=1.9.0.0 && <1.10+    , transformers >=0.5.6.2 && <0.7   mixins:       base hiding (Prelude)     , incipit-core (IncipitCore as Prelude)@@ -108,6 +109,7 @@       GADTs       LambdaCase       LiberalTypeSynonyms+      MonadComprehensions       MultiWayIf       OverloadedLabels       OverloadedLists@@ -130,14 +132,14 @@       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.*-    , incipit-core >=0.4 && <0.6-    , polysemy ==1.9.*-    , polysemy-plugin >=0.4.3 && <0.5+      base >=4.16.4.0 && <4.20+    , incipit-core >=0.4.1.0 && <0.7+    , polysemy >=1.9.0.0 && <1.10+    , polysemy-plugin >=0.4.3.0 && <0.5     , polysemy-resume-    , polysemy-test >=0.6 && <0.10-    , stm-    , tasty ==1.4.*+    , polysemy-test >=0.6.0.0 && <0.11+    , stm >=2.5.0.2 && <2.6+    , tasty >=1.4.0.3 && <1.5   mixins:       base hiding (Prelude)     , incipit-core (IncipitCore as Prelude)
test/Polysemy/Resume/Test/ScopedTest.hs view
@@ -3,16 +3,6 @@ module Polysemy.Resume.Test.ScopedTest where  import Control.Concurrent.STM (TVar, atomically, modifyTVar', newTVarIO, readTVarIO, writeTVar)-import Polysemy.Scoped (-  Scoped,-  interpretScoped,-  interpretScopedH,-  interpretScopedH',-  interpretScopedWithH,-  rescope,-  scoped,-  scoped_,-  ) import Polysemy.Test (UnitTest, runTestAuto, unitTest, (===)) import Test.Tasty (TestTree, testGroup)