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

Data.Effect

Description

 
Synopsis

Documentation

type EffectF = Type -> Type Source #

The kind of first-order effects.

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

The kind of higher-order effects.

newtype LiftFOE (ins :: EffectF) (f :: Type -> Type) a Source #

Lift first-order effects to higher-order effects.

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

Constructors

LiftFOE 

Fields

Instances

Instances details
HFunctor (LiftFOE ins) Source # 
Instance details

Defined in Data.Effect

Methods

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

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

Defined in Control.Effect

Methods

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

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

Defined in Data.Effect

Methods

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

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

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

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

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

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

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

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

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

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

null :: LiftFOE ins f a -> Bool #

length :: LiftFOE ins f a -> Int #

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

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

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

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

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

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

Defined in Data.Effect

Methods

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

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

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

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

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

Defined in Data.Effect

Methods

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

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

data Nop a Source #

A first-order effect with no operations.

type LNop = LiftFOE Nop Source #

A higher-order effect with no operations.