supply-chain-0.0.1.0: Composable request-response pipelines
Safe HaskellSafe-Inferred
LanguageGHC2021

SupplyChain.Effect

Description

An effect is either request or perform

Synopsis

Type

data Effect (up :: k -> Type) (action :: k -> Type) (product :: k) #

Constructors

Request (up product) 
Perform (action product) 

General alteration

alterRequest Source #

Arguments

:: (up product -> Effect up' action product)

Transformation applied if the effect is a request

-> Effect up action product 
-> Effect up' action product 

alterPerform Source #

Arguments

:: (action product -> Effect up action' product)

Transformation applied if the effect is an action

-> Effect up action product 
-> Effect up action' product 

Simplified alteration

alterRequest' Source #

Arguments

:: (up product -> up' product)

Transformation applied if the effect is a request

-> Effect up action product 
-> Effect up' action product 

alterPerform' Source #

Arguments

:: (action product -> action' product)

Transformation applied if the effect is an action

-> Effect up action product 
-> Effect up action' product