effectful-core
Safe HaskellSafe-Inferred
LanguageGHC2021

Effectful.Output.Dynamic

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

Effect

data Output o :: Effect where Source #

Provide the ability to feed values of type o to a handler.

Constructors

Output :: o -> Output o m () 

Instances

Instances details
type DispatchOf (Output o) Source # 
Instance details

Defined in Effectful.Output.Dynamic

Handlers

runOutputAction Source #

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).

Operations

output Source #

Arguments

:: (HasCallStack, Output o :> es) 
=> o

The value.

-> Eff es () 

Feed the value to the underlying handler.