Provide the ability to return early with a value of type r.
Constructors
ReturnWith :: r -> ReturnWith r a b
Instances1DispatchOf
type DispatchOf (ReturnWith r) = 'DynamicDefined in effectful-core-2.7.1.2 · Effectful.ReturnWith.Dynamic
:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11
Moduleeffectful-core-2.7.1.2GHC2021
Convenience functions for the Labeled ReturnWith effect.
Provide the ability to return early with a value of type r.
ReturnWith :: r -> ReturnWith r a btype DispatchOf (ReturnWith r) = 'DynamicDefined in effectful-core-2.7.1.2 · Effectful.ReturnWith.DynamicRun a computation that can return early with a value of type r (via
Effectful.ReturnWith.Static).
Return early with the given value.
Assign a label to an effect.
Note: labeled effects are best used together with the effectful-plugin package, as it significantly improves their usability.
The constructor is for sending labeled operations of a dynamically dispatched effect to the handler:
import Effectful.Dispatch.Dynamic:{ data X :: Effect where X :: X m Int type instance DispatchOf X = Dynamic:}
:{ runPureEff . runLabeled @"x" (interpret_ $ \X -> pure 333) $ do send $ Labeled @"x" X:}333
type DispatchOf (Labeled label e) = DispatchOf eDefined in effectful-core-2.7.1.2 · Effectful.Labeleddata StaticRep (Labeled label e)Defined in effectful-core-2.7.1.2 · Effectful.Labeled