data-effects-0.1.2.0: A basic framework for effect systems based on effects represented by GADTs.
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Effect.Chronicle

Documentation

data ChronicleF c a where Source #

Constructors

Dictate :: c -> ChronicleF c () 
Confess :: c -> ChronicleF c a 

data ChronicleH c f a where Source #

Constructors

Memento :: f a -> ChronicleH c f (Either c a) 
Absolve :: a -> f a -> ChronicleH c f a 
Condemn :: f a -> ChronicleH c f a 

Instances

Instances details
() => HFunctor (ChronicleH c) Source # 
Instance details

Defined in Data.Effect.Chronicle

Methods

hfmap :: forall (f :: Type -> Type) (g :: Type -> Type). (f :-> g) -> ChronicleH c f :-> ChronicleH c g #

condemn'' :: forall key (a :: Type) (c :: Type) f. SendSigBy key (ChronicleH c) f => f a -> f a Source #

condemn' :: forall tag (a :: Type) (c :: Type) f. SendSig (TagH (ChronicleH c) tag) f => f a -> f a Source #

condemn :: forall (a :: Type) (c :: Type) f. SendSig (ChronicleH c) f => f a -> f a Source #

absolve'' :: forall key (a :: Type) (c :: Type) f. SendSigBy key (ChronicleH c) f => a -> f a -> f a Source #

absolve' :: forall tag (a :: Type) (c :: Type) f. SendSig (TagH (ChronicleH c) tag) f => a -> f a -> f a Source #

absolve :: forall (a :: Type) (c :: Type) f. SendSig (ChronicleH c) f => a -> f a -> f a Source #

memento'' :: forall key (a :: Type) (c :: Type) f. SendSigBy key (ChronicleH c) f => f a -> f (Either c a) Source #

memento' :: forall tag (a :: Type) (c :: Type) f. SendSig (TagH (ChronicleH c) tag) f => f a -> f (Either c a) Source #

memento :: forall (a :: Type) (c :: Type) f. SendSig (ChronicleH c) f => f a -> f (Either c a) Source #

pattern LConfess :: () => (a ~ a, ()) => c -> LiftIns (ChronicleF c) f a Source #

pattern LDictate :: () => (a ~ (), ()) => c -> LiftIns (ChronicleF c) f a Source #

confess'' :: forall key (c :: Type) (a :: Type) f. SendInsBy key (ChronicleF c) f => c -> f a Source #

confess' :: forall tag (c :: Type) (a :: Type) f. SendIns (Tag (ChronicleF c) tag) f => c -> f a Source #

confess :: forall (c :: Type) (a :: Type) f. SendIns (ChronicleF c) f => c -> f a Source #

dictate'' :: forall key (c :: Type) f. SendInsBy key (ChronicleF c) f => c -> f () Source #

dictate' :: forall tag (c :: Type) f. SendIns (Tag (ChronicleF c) tag) f => c -> f () Source #

dictate :: forall (c :: Type) f. SendIns (ChronicleF c) f => c -> f () Source #

chronicle :: (ChronicleF c <: f, Applicative f) => These c a -> f a Source #