fused-effects-0.5.0.1: A fast, flexible, fused effect system.
Safe HaskellNone
LanguageHaskell2010

Control.Effect.Pure

Synopsis

Pure effect

data Pure (m :: * -> *) k Source #

Instances

Instances details
Effect Pure Source # 
Instance details

Defined in Control.Effect.Carrier

Methods

handle :: (Functor f, Monad m) => f () -> (forall x. f (m x) -> n (f x)) -> Pure m a -> Pure n (f a) Source #

HFunctor Pure Source # 
Instance details

Defined in Control.Effect.Carrier

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Pure f) => (a -> b) -> Pure f a -> Pure f b Source #

hmap :: Functor m => (forall x. m x -> n x) -> Pure m a -> Pure n a Source #

Carrier Pure PureC Source # 
Instance details

Defined in Control.Effect.Carrier

Methods

eff :: Pure PureC a -> PureC a Source #

Functor (Pure m) Source # 
Instance details

Defined in Control.Effect.Pure

Methods

fmap :: (a -> b) -> Pure m a -> Pure m b #

(<$) :: a -> Pure m b -> Pure m a #

Generic1 (Pure m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Pure

Associated Types

type Rep1 (Pure m) :: k -> Type #

Methods

from1 :: forall (a :: k). Pure m a -> Rep1 (Pure m) a #

to1 :: forall (a :: k). Rep1 (Pure m) a -> Pure m a #

type Rep1 (Pure m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Pure

type Rep1 (Pure m :: Type -> Type) = D1 ('MetaData "Pure" "Control.Effect.Pure" "fused-effects-0.5.0.1-inplace" 'False) (V1 :: Type -> Type)

Pure carrier

run :: PureC a -> a Source #

Run an action exhausted of effects to produce its final result value.

newtype PureC a Source #

Constructors

PureC 

Fields

Instances

Instances details
Monad PureC Source # 
Instance details

Defined in Control.Effect.Pure

Methods

(>>=) :: PureC a -> (a -> PureC b) -> PureC b #

(>>) :: PureC a -> PureC b -> PureC b #

return :: a -> PureC a #

Functor PureC Source # 
Instance details

Defined in Control.Effect.Pure

Methods

fmap :: (a -> b) -> PureC a -> PureC b #

(<$) :: a -> PureC b -> PureC a #

MonadFix PureC Source # 
Instance details

Defined in Control.Effect.Pure

Methods

mfix :: (a -> PureC a) -> PureC a #

Applicative PureC Source # 
Instance details

Defined in Control.Effect.Pure

Methods

pure :: a -> PureC a #

(<*>) :: PureC (a -> b) -> PureC a -> PureC b #

liftA2 :: (a -> b -> c) -> PureC a -> PureC b -> PureC c #

(*>) :: PureC a -> PureC b -> PureC b #

(<*) :: PureC a -> PureC b -> PureC a #

Carrier Pure PureC Source # 
Instance details

Defined in Control.Effect.Carrier

Methods

eff :: Pure PureC a -> PureC a Source #