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
(c) 2023 Casper Bach Poulsen and Cas van der Rest
LicenseMPL-2.0 (see the file LICENSE)
Maintainerymdfield@outlook.jp
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Effect

Description

 
Synopsis

Documentation

type SigClass = (Type -> Type) -> Type -> Type Source #

A kind of signature class (a datatype of higher-order effect).

type InsClass = Type -> Type Source #

A kind of instruction class (a datatype of first-order effect).

newtype LiftIns (ins :: InsClass) (f :: Type -> Type) a Source #

Lift an instruction class to a signature class.

Come from heft-lang/POPL2023/haskell/src/Elab.hs.

Constructors

LiftIns 

Fields

Instances

Instances details
HFunctor (LiftIns ins) Source # 
Instance details

Defined in Data.Effect

Methods

hfmap :: forall (f :: Type -> Type) (g :: Type -> Type). (f :-> g) -> LiftIns ins f :-> LiftIns ins g #

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

Defined in Control.Effect

Methods

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

Foldable ins => Foldable (LiftIns ins f) Source # 
Instance details

Defined in Data.Effect

Methods

fold :: Monoid m => LiftIns ins f m -> m #

foldMap :: Monoid m => (a -> m) -> LiftIns ins f a -> m #

foldMap' :: Monoid m => (a -> m) -> LiftIns ins f a -> m #

foldr :: (a -> b -> b) -> b -> LiftIns ins f a -> b #

foldr' :: (a -> b -> b) -> b -> LiftIns ins f a -> b #

foldl :: (b -> a -> b) -> b -> LiftIns ins f a -> b #

foldl' :: (b -> a -> b) -> b -> LiftIns ins f a -> b #

foldr1 :: (a -> a -> a) -> LiftIns ins f a -> a #

foldl1 :: (a -> a -> a) -> LiftIns ins f a -> a #

toList :: LiftIns ins f a -> [a] #

null :: LiftIns ins f a -> Bool #

length :: LiftIns ins f a -> Int #

elem :: Eq a => a -> LiftIns ins f a -> Bool #

maximum :: Ord a => LiftIns ins f a -> a #

minimum :: Ord a => LiftIns ins f a -> a #

sum :: Num a => LiftIns ins f a -> a #

product :: Num a => LiftIns ins f a -> a #

Traversable ins => Traversable (LiftIns ins f) Source # 
Instance details

Defined in Data.Effect

Methods

traverse :: Applicative f0 => (a -> f0 b) -> LiftIns ins f a -> f0 (LiftIns ins f b) #

sequenceA :: Applicative f0 => LiftIns ins f (f0 a) -> f0 (LiftIns ins f a) #

mapM :: Monad m => (a -> m b) -> LiftIns ins f a -> m (LiftIns ins f b) #

sequence :: Monad m => LiftIns ins f (m a) -> m (LiftIns ins f a) #

Functor ins => Functor (LiftIns ins f) Source # 
Instance details

Defined in Data.Effect

Methods

fmap :: (a -> b) -> LiftIns ins f a -> LiftIns ins f b #

(<$) :: a -> LiftIns ins f b -> LiftIns ins f a #

data Nop :: InsClass Source #

An instruction class with no effects.

type LNop = LiftIns Nop Source #

A signature class with no effects.