effectful-core
Safe HaskellSafe-Inferred
LanguageGHC2021

Effectful.Input.Static

Description

Support for access to a value of a particular type.

Since: 2.7.0.0

Synopsis

Effect

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

Provide access to a value of type i.

Instances

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

Defined in Effectful.Input.Static

newtype StaticRep (Input i) Source # 
Instance details

Defined in Effectful.Input.Static

newtype StaticRep (Input i) = Input i

Handlers

runInput Source #

Arguments

:: HasCallStack 
=> i

The input value.

-> Eff (Input i : es) a 
-> Eff es a 

Run the Input effect with the given value.

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