effectful-core
Safe HaskellSafe-Inferred
LanguageGHC2021

Effectful.Input.Static.Action

Description

Support for access to values supplied by a monadic action.

Since: 2.7.0.0

Synopsis

Effect

data Input (i :: Type) :: Effect Source #

Provide access to values of type i supplied by a monadic action.

Instances

Instances details
type DispatchOf (Input i) Source # 
Instance details

Defined in Effectful.Input.Static.Action

data StaticRep (Input i) Source # 
Instance details

Defined in Effectful.Input.Static.Action

data StaticRep (Input i) where

Handlers

runInput Source #

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.

Operations

input :: (HasCallStack, Input i :> es) => Eff es i Source #

Fetch the value.

inputs Source #

Arguments

:: (HasCallStack, Input i :> es) 
=> (i -> a)

The function to apply to the value.

-> Eff es a 

Fetch the result of applying a function to the value.

inputs f ≡ f <$> input