packages feed

effectful-core 2.7.0.0 → 2.7.1.0

raw patch · 10 files changed

+31/−8 lines, 10 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Effectful.Dispatch.Dynamic: infixr 5 ++
+ Effectful.Dispatch.Dynamic: type family (xs :: [Effect]) ++ (ys :: [Effect]) :: [Effect]
+ Effectful.Dispatch.Static: seqForkUnliftIO :: HasCallStack => Env es -> ((forall r. Eff es r -> IO r) -> IO a) -> IO a
+ Effectful.Dispatch.Static: unsafeSeqForkUnliftIO :: HasCallStack => ((forall r. Eff es r -> IO r) -> IO a) -> Eff es a
- Effectful.Exception: handleJust :: (HasCallStack, Exception e) => (e -> Maybe b) -> (b -> Eff es a) -> Eff es a -> Eff es a
+ Effectful.Exception: handleJust :: Exception e => (e -> Maybe b) -> (b -> Eff es a) -> Eff es a -> Eff es a

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+# effectful-core-2.7.1.0 (2026-08-24)+* Export `seqForkUnliftIO` and add `unsafeSeqForkUnliftIO` in+  `Effectful.Dispatch.Static` for the `SeqForkUnlift` strategy.+* Export `type (++)` from `Effectful.Dispatch.Dynamic`.+* Remove an unnecessary `HasCallStack` constraint from `handleJust`.+ # effectful-core-2.7.0.0 (2026-08-24) * Add the `Input` effect (`Effectful.Input.Dynamic`, `Effectful.Input.Static`,   `Effectful.Input.Static.Action` and `Effectful.Labeled.Input`) for access to
effectful-core.cabal view
@@ -1,7 +1,7 @@ cabal-version:      3.8 build-type:         Simple name:               effectful-core-version:            2.7.0.0+version:            2.7.1.0 license:            BSD-3-Clause license-file:       LICENSE category:           Control
src/Effectful.hs view
@@ -148,7 +148,7 @@ -- -- These libraries can trivially be used with the 'Eff' monad since it provides -- typical instances that these libraries require the underlying monad to have,--- such as t'Effectful.Exception.MonadMask' or 'MonadUnliftIO'.+-- such as t'Control.Monad.Catch.MonadMask' or 'MonadUnliftIO'. -- -- In case the 'Eff' monad doesn't provide a specific instance out of the box, -- it can be supplied via an effect. As an example see how the instance of
src/Effectful/Dispatch/Dynamic.hs view
@@ -59,6 +59,7 @@   , localLendBorrow   , SharedSuffix   , KnownSubset+  , type (++)      -- ** Utils for first order effects   , EffectHandler_
src/Effectful/Dispatch/Static.hs view
@@ -25,8 +25,10 @@      -- ** Unlifts   , seqUnliftIO+  , seqForkUnliftIO   , concUnliftIO   , unsafeSeqUnliftIO+  , unsafeSeqForkUnliftIO   , unsafeConcUnliftIO      -- ** Utils@@ -198,6 +200,20 @@   -> Eff es a unsafeSeqUnliftIO k = unsafeEff $ \es -> do   seqUnliftIO es k++-- | Create an unlifting function with the 'SeqForkUnlift' strategy.+--+-- This function is __unsafe__ because it can be used to introduce arbitrary+-- 'IO' actions into pure 'Eff' computations.+--+-- @since 2.7.1.0+unsafeSeqForkUnliftIO+  :: HasCallStack+  => ((forall r. Eff es r -> IO r) -> IO a)+  -- ^ Continuation with the unlifting function in scope.+  -> Eff es a+unsafeSeqForkUnliftIO k = unsafeEff $ \es -> do+  seqForkUnliftIO es k  -- | Create an unlifting function with the 'ConcUnlift' strategy. --
src/Effectful/Exception.hs view
@@ -302,7 +302,7 @@  -- | Flipped version of 'catchJust'. handleJust-  :: (HasCallStack, E.Exception e)+  :: E.Exception e   => (e -> Maybe b)   -- ^ The predicate.   -> (b -> Eff es a)
src/Effectful/Internal/Env.hs view
@@ -77,7 +77,7 @@ -- __Warning: the environment is a mutable data structure and cannot be simultaneously used from multiple threads under any circumstances.__ -- -- In order to pass it to a different thread, you need to perform a deep copy--- with the 'cloneEnv' funtion.+-- with the 'cloneEnv' function. -- -- Offers very good performance characteristics for most often performed -- operations:@@ -381,7 +381,7 @@  -- | Replace a specific effect in the stack with a new value. ----- /Note:/ unlike in 'putEnv' the value in not changed in place, so only the new+-- /Note:/ unlike in 'putEnv' the value is not changed in place, so only the new -- environment will see it. replaceEnv   :: forall e es. (HasCallStack, e :> es)
src/Effectful/Labeled/Provider/List.hs view
@@ -29,7 +29,7 @@ import Effectful import Effectful.Dispatch.Dynamic import Effectful.Labeled-import Effectful.Provider.List (ProviderList(..), ProviderList_, type (++))+import Effectful.Provider.List (ProviderList(..), ProviderList_) import Effectful.Provider.List qualified as P  -- | Run the labeled 'ProviderList' effect with a given handler.
src/Effectful/State/Static/Shared.hs view
@@ -1,6 +1,6 @@ -- | Support for access to a shared, mutable value of a particular type. ----- The value is shared between multiple threads. If you want each thead to+-- The value is shared between multiple threads. If you want each thread to -- manage its own version of the value, use "Effectful.State.Static.Local". -- -- /Note:/ unlike the 'Control.Monad.Trans.State.StateT' monad transformer from
src/Effectful/Writer/Static/Shared.hs view
@@ -1,6 +1,6 @@ -- | Support for access to a write only value of a particular type. ----- The value is shared between multiple threads. If you want each thead to+-- The value is shared between multiple threads. If you want each thread to -- manage its own version of the value, use "Effectful.Writer.Static.Local". -- -- /Warning:/ 'Writer'\'s state will be accumulated via __left-associated__ uses