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

Control.Effect

Description

 
Synopsis

Documentation

class SendIns (ins :: InsClass) f where Source #

A type class that represents the ability to send an instruction ins to carrier f.

Methods

sendIns :: ins a -> f a Source #

Send an instruction ins to carrier f.

Instances

Instances details
SendInsBy key ins f => SendIns ins (ByKey key f) Source # 
Instance details

Defined in Control.Effect.Key

Methods

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

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

Defined in Control.Effect.Tag

Methods

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

type (<:) = SendIns infix 2 Source #

The operator version of SendIns.

class SendSig (sig :: SigClass) f where Source #

A type class that represents the ability to send a signature sig to carrier f.

Methods

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

Send a signature sig to carrier f.

Instances

Instances details
(SendSigBy key sig f, HFunctor sig) => SendSig sig (ByKey key f) Source # 
Instance details

Defined in Control.Effect.Key

Methods

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

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

Defined in Control.Effect.Tag

Methods

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

SendIns ins f => SendSig (LiftIns ins) f Source # 
Instance details

Defined in Control.Effect

Methods

sendSig :: LiftIns ins f a -> f a Source #

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

The operator version of SendSig.

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

A natural transformation.