| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Effectful.Input.Dynamic
Contents
Description
The dynamically dispatched variant of the Input effect.
Note: unless you plan to change interpretations at runtime, it's recommended to use one of the statically dispatched variants, i.e. Effectful.Input.Static or Effectful.Input.Static.Action.
Since: 2.7.0.0
Synopsis
- data Input i :: Effect where
- runInput :: HasCallStack => i -> Eff (Input i : es) a -> Eff es a
- runInputAction :: forall i es a. HasCallStack => (HasCallStack => Eff es i) -> Eff (Input i : es) a -> Eff es a
- input :: (HasCallStack, Input i :> es) => Eff es i
- inputs :: (HasCallStack, Input i :> es) => (i -> a) -> Eff es a
Effect
data Input i :: Effect where Source #
Provide access to values of type i.
Instances
| type DispatchOf (Input i) Source # | |
Defined in Effectful.Input.Dynamic | |
Handlers
Arguments
| :: HasCallStack | |
| => i | The input value. |
| -> Eff (Input i : es) a | |
| -> Eff es a |
Run the Input effect with the given value.
Arguments
| :: forall i es a. HasCallStack | |
| => (HasCallStack => Eff es i) | The action for input generation. |
| -> Eff (Input i : es) a | |
| -> Eff es a |
Run the Input effect with the given action that supplies values.