packages feed

polysemy-zoo 0.5.0.0 → 0.5.0.1

raw patch · 5 files changed

+58/−54 lines, 5 filesdep ~polysemy

Dependency ranges changed: polysemy

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for polysemy-zoo +## 0.5.0.1 (2019-07-25)++- Fixed some bugs with haddock+ ## 0.5.0.0 (2019-07-24)  - Added Continuation effects (thanks to @KingoftheHomeless)
polysemy-zoo.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: b5948d18149d91c0146fbe5d3157841cde0905f00af5918f7a69c432059e6db1+-- hash: c9916a386c633f322272b00c91e9e16e395cf2d02474c4da8e7bd02ed2828c0f  name:           polysemy-zoo-version:        0.5.0.0+version:        0.5.0.1 synopsis:       Experimental, user-contributed effects and interpreters for polysemy description:    Please see the README on GitHub at <https://github.com/isovector/polysemy-zoo#readme> category:       Polysemy@@ -70,7 +70,7 @@     , ghc-prim >=0.5.2 && <0.6     , hedis >=0.10 && <0.13     , mtl >=2.0.1.0 && <3.0.0.0-    , polysemy >=0.7.0.0+    , polysemy >=1.0.0.0     , polysemy-plugin >=0.2     , random >=1.1 && <1.2     , reflection >=2.1.4 && <3.0.0
src/Polysemy/Capture.hs view
@@ -43,15 +43,15 @@   Delimit  :: m a -> Capture ref m a   Delimit' :: m a -> Capture ref m (Maybe a) -makeSem ''Capture+makeSem_ ''Capture  ----------------------------------------------------------------------------- -- | Reifies the current continuation in the form of a prompt, and passes it to -- the first argument.--- reify :: forall ref a r---       .  Member (Capture ref) r---       => (forall s. ref s a -> Sem r s)---       -> Sem r a+reify :: forall ref a r+      .  Member (Capture ref) r+      => (forall s. ref s a -> Sem r s)+      -> Sem r a  ----------------------------------------------------------------------------- -- | Provide an answer to a prompt, jumping to its reified continuation.@@ -62,26 +62,26 @@ -- It may sometimes become necessary to handle such cases. To do so, -- use 'delimit\'' together with 'reflect' (the reified continuation -- is already delimited).--- reflect :: forall ref a x r---         .  Member (Capture ref) r---         => ref a x---         -> x---         -> Sem r a+reflect :: forall ref s a r+        .  Member (Capture ref) r+        => ref s a+        -> a+        -> Sem r s  ----------------------------------------------------------------------------- -- | Delimits any continuations--- delimit :: forall ref a r---         .  Member (Capture ref) r---         => Sem r a---         -> Sem r a+delimit :: forall ref a r+        .  Member (Capture ref) r+        => Sem r a+        -> Sem r a  ----------------------------------------------------------------------------- -- | Delimits any continuations, and detects if any subcontinuation -- has failed locally.--- delimit' :: forall ref a r---          .  Member (Capture ref) r---          => Sem r a---          -> Sem r (Maybe a)+delimit' :: forall ref a r+         .  Member (Capture ref) r+         => Sem r a+         -> Sem r (Maybe a)  ----------------------------------------------------------------------------- -- | A restricted version of 'Polysemy.Shift.shift'.
src/Polysemy/Cont/Internal.hs view
@@ -20,7 +20,7 @@   Jump    :: ref a -> a -> Cont ref m b   Subst   :: (ref a -> m b) -> (a -> m b) -> Cont ref m b -makeSem ''Cont+makeSem_ ''Cont  ----------------------------------------------------------------------------- -- | Provide an answer to a prompt, jumping to its reified continuation,@@ -38,22 +38,22 @@ -- The only exception to this is if you interpret such effects /and/ 'Cont' -- in terms of the final monad, and the final monad can perform such interactions -- in a meaningful manner.--- jump :: forall ref x a r.---         Member (Cont ref) r---      => ref x---      -> x---      -> Sem r a+jump :: forall ref a b r.+        Member (Cont ref) r+     => ref a+     -> a+     -> Sem r b  ----------------------------------------------------------------------------- -- | Reifies the current continuation in the form of a prompt, and passes it to -- the first argument. If the prompt becomes invoked via 'jump', then the -- second argument will be run before the reified continuation, and otherwise -- will not be called at all.--- subst :: forall ref x a r.---          Member (Cont ref) r---       => (ref x -> Sem r a)---       -> (x -> Sem r a)---       -> Sem r a+subst :: forall ref a b r+      .  Member (Cont ref) r+      => (ref a -> Sem r b)+      -> (a -> Sem r b)+      -> Sem r b  ----------------------------------------------------------------------------- -- | Runs a 'Cont' effect by providing a final continuation.
src/Polysemy/Shift/Internal.hs view
@@ -20,16 +20,16 @@   Reset   :: m s -> Shift ref s m s   Reset'  :: m s -> Shift ref s m (Maybe s) -makeSem ''Shift+makeSem_ ''Shift  ----------------------------------------------------------------------------- -- | Reifies the current continuation in the form of a prompt, and passes it to -- the first argument. Unlike 'subst', control will never return to the current -- continuation unless the prompt is invoked via 'release'.--- trap :: forall ref s a r---      .  Member (Shift ref s) r---      => (ref a -> Sem r s)---      -> Sem r a+trap :: forall ref s a r+     .  Member (Shift ref s) r+     => (ref a -> Sem r s)+     -> Sem r a  ----------------------------------------------------------------------------- -- | Provide an answer to a prompt, jumping to its reified continuation.@@ -49,34 +49,34 @@ -- The provided continuation may fail locally in its subcontinuations. -- It may sometimes become necessary to handle such cases. To do so, -- use 'reset\'' together with 'release'.--- invoke :: forall ref a x r---        .  Member (Shift ref a) r---        => ref x---        -> x---        -> Sem r a+invoke :: forall ref s a r+       .  Member (Shift ref s) r+       => ref a+       -> a+       -> Sem r s   ----------------------------------------------------------------------------- -- | Aborts the current continuation with a result.--- abort :: forall ref s a r---       .  Member (Shift ref s) r---       => s---       -> Sem r a+abort :: forall ref s a r+      .  Member (Shift ref s) r+      => s+      -> Sem r a  ----------------------------------------------------------------------------- -- | Delimits any continuations and calls to 'abort'.--- reset :: forall ref a r---       .  Member (Shift ref a) r---       => Sem r a---       -> Sem r a+reset :: forall ref s r+      .  Member (Shift ref s) r+      => Sem r s+      -> Sem r s  ----------------------------------------------------------------------------- -- | Delimits any continuations and calls to 'abort', and detects if -- any subcontinuation has failed locally.--- reset' :: forall ref s r---        .  Member (Shift ref s) r---        => Sem r s---        -> Sem r (Maybe s)+reset' :: forall ref s r+       .  Member (Shift ref s) r+       => Sem r s+       -> Sem r (Maybe s)  runShiftWeaving :: Monad m                 => (forall x. (x -> m (Maybe s)) -> Sem r x -> m (Maybe s))