Module

Control.Eff.Variant

Package
purescript-effectful
Repository
the-dr-lazy/purescript-effectful

#Variant Source

data Variant :: Row Algebra -> (Type -> Type) -> Type -> Typedata Variant r m a

Instances

#VariantRep Source

newtype VariantRep :: Algebra -> (Type -> Type) -> Type -> Typenewtype VariantRep f m a

Constructors

  • VariantRep { map :: forall x y. (x -> y) -> f m x -> f m y, tag :: String, value :: f m a }

#inject Source

inject :: forall tag f r fr m a. Cons tag f r fr => IsSymbol tag => Functor (f m) => Proxy tag -> f m a -> Variant fr m a

#interpret Source

interpret :: forall tag f r fr m a b. Cons tag f r fr => IsSymbol tag => Proxy tag -> (f m a -> b) -> (Variant r m a -> b) -> (Variant fr m a -> b)

#intercept Source

intercept :: forall tag f r fr m a b. Cons tag f r fr => IsSymbol tag => Proxy tag -> (f m a -> b) -> (Variant fr m a -> b) -> (Variant fr m a -> b)

#reinterpret Source

reinterpret :: forall tag tag' f g r fr gr m a b. Cons tag f r fr => Cons tag' g r gr => IsSymbol tag => Proxy tag -> (f m a -> b) -> (Variant fr m a -> b) -> (Variant gr m a -> b)

#empty Source

empty :: forall m a b. Variant () m a -> b