data-effects-core-0.2.0.0: A basic framework for effect systems based on effects represented by GADTs.
Copyright(c) 2023-2024 Sayo Koyoneda
LicenseMPL-2.0 (see the file LICENSE)
Maintainerymdfield@outlook.jp
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageGHC2021

Control.Effect

Description

 
Synopsis

Documentation

class SendFOE (ins :: EffectF) (f :: Type -> Type) where Source #

A type class that represents the ability to send an first-order effect ins to carrier f.

Methods

sendFOE :: ins a -> f a Source #

Send an instruction ins to carrier f.

Instances

Instances details
SendFOEBy key ins f => SendFOE ins (ByKey key f) Source # 
Instance details

Defined in Control.Effect.Key

Methods

sendFOE :: ins a -> ByKey key f a Source #

SendFOE (ins # tag) f => SendFOE ins (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

sendFOE :: ins a -> ViaTag tag f a Source #

type (<:) = SendFOE infix 2 Source #

The operator version of SendFOE.

class SendHOE (sig :: EffectH) (f :: Type -> Type) where Source #

A type class that represents the ability to send a higher-order effect sig to carrier f.

Methods

sendHOE :: sig f a -> f a Source #

Send a higher-order effect sig to carrier f.

Instances

Instances details
(SendHOEBy key sig f, HFunctor sig) => SendHOE sig (ByKey key f) Source # 
Instance details

Defined in Control.Effect.Key

Methods

sendHOE :: sig (ByKey key f) a -> ByKey key f a Source #

(SendHOE (sig ## tag) f, HFunctor sig) => SendHOE sig (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

sendHOE :: sig (ViaTag tag f) a -> ViaTag tag f a Source #

SendFOE ins f => SendHOE (LiftFOE ins) f Source # 
Instance details

Defined in Control.Effect

Methods

sendHOE :: LiftFOE ins f a -> f a Source #

type (<<:) = SendHOE infix 2 Source #

The operator version of SendHOE.

type (~>) (f :: Type -> Type) (g :: Type -> Type) = forall x. f x -> g x infixr 2 Source #

A natural transformation.