| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Effectful.Output.Dynamic
Contents
Description
The dynamically dispatched variant of the Output effect.
Note: unless you plan to change interpretations at runtime, it's recommended to use one of the statically dispatched variants, i.e. Effectful.Output.Static.Action, Effectful.Output.Static.Local.Array, Effectful.Output.Static.Local.List, Effectful.Output.Static.Shared.Array or Effectful.Output.Static.Shared.List.
Since: 2.7.0.0
Synopsis
- data Output o :: Effect where
- runOutputAction :: forall o es a. HasCallStack => (HasCallStack => o -> Eff es ()) -> Eff (Output o : es) a -> Eff es a
- runOutputLocalArray :: HasCallStack => Eff (Output o : es) a -> Eff es (a, Array o)
- runOutputLocalList :: HasCallStack => Eff (Output o : es) a -> Eff es (a, [o])
- runOutputSharedArray :: HasCallStack => Eff (Output o : es) a -> Eff es (a, Array o)
- runOutputSharedList :: HasCallStack => Eff (Output o : es) a -> Eff es (a, [o])
- output :: (HasCallStack, Output o :> es) => o -> Eff es ()
Effect
data Output o :: Effect where Source #
Provide the ability to feed values of type o to a handler.
Instances
| type DispatchOf (Output o) Source # | |
Defined in Effectful.Output.Dynamic | |
Handlers
Arguments
| :: forall o es a. HasCallStack | |
| => (HasCallStack => o -> Eff es ()) | The action for output generation. |
| -> Eff (Output o : es) a | |
| -> Eff es a |
Run the Output effect with the given action for receiving values.
runOutputLocalArray :: HasCallStack => Eff (Output o : es) a -> Eff es (a, Array o) Source #
Run the Output effect and return the final value along with the
accumulated array (via Effectful.Output.Static.Local.Array).
runOutputLocalList :: HasCallStack => Eff (Output o : es) a -> Eff es (a, [o]) Source #
Run the Output effect and return the final value along with the
accumulated list (via Effectful.Output.Static.Local.List).
runOutputSharedArray :: HasCallStack => Eff (Output o : es) a -> Eff es (a, Array o) Source #
Run the Output effect and return the final value along with the
accumulated array (via Effectful.Output.Static.Shared.Array).
runOutputSharedList :: HasCallStack => Eff (Output o : es) a -> Eff es (a, [o]) Source #
Run the Output effect and return the final value along with the
accumulated list (via Effectful.Output.Static.Shared.List).