heftia-0.1.0.0: Higher-order version of Freer.
Copyright(c) 2023 Yamada Ryo
LicenseMPL-2.0 (see the file LICENSE)
Maintainerymdfield@outlook.jp
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Control.Monad.Trans.Heftia

Description

A type class to abstract away the encoding details of the Heftia monad transformers.

Synopsis

Documentation

class (TransHeftia Monad h, forall sig. HFunctor sig => MonadTrans (h sig)) => MonadTransHeftia h where Source #

A type class to abstract away the encoding details of the Heftia monad transformers.

Minimal complete definition

Nothing

Methods

elaborateMK :: (Monad m, HFunctor sig) => (sig (ContT r m) ~> ContT r m) -> h sig m ~> ContT r m Source #

reelaborateMK :: (Monad m, HFunctor sig) => (sig (ContT r (h sig m)) ~> ContT r (h sig m)) -> h sig m ~> ContT r (h sig m) Source #

elaborateMT :: (Monad m, MonadTrans t, Monad (t m), HFunctor sig) => (sig (t m) ~> t m) -> h sig m ~> t m Source #

reelaborateMT :: forall m t n sig. (Monad m, MonadTrans t, Coercible n (h sig m), Monad (t n), Monad n, HFunctor sig) => (sig (t n) ~> t n) -> h sig m ~> t n Source #

Instances

Instances details
MonadTransHeftia (HeftiaChurchT :: ((Type -> TYPE LiftedRep) -> Type -> Type) -> (Type -> Type) -> Type -> TYPE LiftedRep) Source # 
Instance details

Defined in Control.Monad.Trans.Heftia.Church

Methods

elaborateMK :: forall (m :: Type -> Type) (sig :: (Type -> Type) -> Type -> Type) r. (Monad m, HFunctor sig) => (sig (ContT r m) ~> ContT r m) -> HeftiaChurchT sig m ~> ContT r m Source #

reelaborateMK :: forall (m :: Type -> Type) (sig :: (Type -> Type) -> Type -> Type) r. (Monad m, HFunctor sig) => (sig (ContT r (HeftiaChurchT sig m)) ~> ContT r (HeftiaChurchT sig m)) -> HeftiaChurchT sig m ~> ContT r (HeftiaChurchT sig m) Source #

elaborateMT :: forall (m :: Type -> Type) (t :: (Type -> Type) -> Type -> Type) (sig :: (Type -> Type) -> Type -> Type). (Monad m, MonadTrans t, Monad (t m), HFunctor sig) => (sig (t m) ~> t m) -> HeftiaChurchT sig m ~> t m Source #

reelaborateMT :: forall (m :: Type -> Type) (t :: (Type -> Type) -> Type -> Type) (n :: Type -> Type) (sig :: (Type -> Type) -> Type -> Type). (Monad m, MonadTrans t, Coercible n (HeftiaChurchT sig m), Monad (t n), Monad n, HFunctor sig) => (sig (t n) ~> t n) -> HeftiaChurchT sig m ~> t n Source #

reinterpretHTTViaFinal :: forall h m t n sig. (MonadTransHeftia h, Monad m, MonadTrans t, Coercible n (h sig m), Monad (t n), Monad n, HFunctor sig) => (sig (t n) ~> t n) -> h sig m ~> t n Source #

newtype ViaLiftLowerH (h :: Signature -> (Type -> Type) -> Type -> Type) sig m a Source #

Constructors

ViaLiftLowerH 

Fields

Instances

Instances details
(TransHeftia Monad h, HFunctor sig) => MonadTrans (ViaLiftLowerH h sig) Source # 
Instance details

Defined in Control.Monad.Trans.Heftia

Methods

lift :: Monad m => m a -> ViaLiftLowerH h sig m a #

Foldable (h sig m) => Foldable (ViaLiftLowerH h sig m) Source # 
Instance details

Defined in Control.Monad.Trans.Heftia

Methods

fold :: Monoid m0 => ViaLiftLowerH h sig m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> ViaLiftLowerH h sig m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> ViaLiftLowerH h sig m a -> m0 #

foldr :: (a -> b -> b) -> b -> ViaLiftLowerH h sig m a -> b #

foldr' :: (a -> b -> b) -> b -> ViaLiftLowerH h sig m a -> b #

foldl :: (b -> a -> b) -> b -> ViaLiftLowerH h sig m a -> b #

foldl' :: (b -> a -> b) -> b -> ViaLiftLowerH h sig m a -> b #

foldr1 :: (a -> a -> a) -> ViaLiftLowerH h sig m a -> a #

foldl1 :: (a -> a -> a) -> ViaLiftLowerH h sig m a -> a #

toList :: ViaLiftLowerH h sig m a -> [a] #

null :: ViaLiftLowerH h sig m a -> Bool #

length :: ViaLiftLowerH h sig m a -> Int #

elem :: Eq a => a -> ViaLiftLowerH h sig m a -> Bool #

maximum :: Ord a => ViaLiftLowerH h sig m a -> a #

minimum :: Ord a => ViaLiftLowerH h sig m a -> a #

sum :: Num a => ViaLiftLowerH h sig m a -> a #

product :: Num a => ViaLiftLowerH h sig m a -> a #

Traversable (h sig m) => Traversable (ViaLiftLowerH h sig m) Source # 
Instance details

Defined in Control.Monad.Trans.Heftia

Methods

traverse :: Applicative f => (a -> f b) -> ViaLiftLowerH h sig m a -> f (ViaLiftLowerH h sig m b) #

sequenceA :: Applicative f => ViaLiftLowerH h sig m (f a) -> f (ViaLiftLowerH h sig m a) #

mapM :: Monad m0 => (a -> m0 b) -> ViaLiftLowerH h sig m a -> m0 (ViaLiftLowerH h sig m b) #

sequence :: Monad m0 => ViaLiftLowerH h sig m (m0 a) -> m0 (ViaLiftLowerH h sig m a) #

Applicative (h sig m) => Applicative (ViaLiftLowerH h sig m) Source # 
Instance details

Defined in Control.Monad.Trans.Heftia

Methods

pure :: a -> ViaLiftLowerH h sig m a #

(<*>) :: ViaLiftLowerH h sig m (a -> b) -> ViaLiftLowerH h sig m a -> ViaLiftLowerH h sig m b #

liftA2 :: (a -> b -> c) -> ViaLiftLowerH h sig m a -> ViaLiftLowerH h sig m b -> ViaLiftLowerH h sig m c #

(*>) :: ViaLiftLowerH h sig m a -> ViaLiftLowerH h sig m b -> ViaLiftLowerH h sig m b #

(<*) :: ViaLiftLowerH h sig m a -> ViaLiftLowerH h sig m b -> ViaLiftLowerH h sig m a #

Functor (h sig m) => Functor (ViaLiftLowerH h sig m) Source # 
Instance details

Defined in Control.Monad.Trans.Heftia

Methods

fmap :: (a -> b) -> ViaLiftLowerH h sig m a -> ViaLiftLowerH h sig m b #

(<$) :: a -> ViaLiftLowerH h sig m b -> ViaLiftLowerH h sig m a #

Monad (h sig m) => Monad (ViaLiftLowerH h sig m) Source # 
Instance details

Defined in Control.Monad.Trans.Heftia

Methods

(>>=) :: ViaLiftLowerH h sig m a -> (a -> ViaLiftLowerH h sig m b) -> ViaLiftLowerH h sig m b #

(>>) :: ViaLiftLowerH h sig m a -> ViaLiftLowerH h sig m b -> ViaLiftLowerH h sig m b #

return :: a -> ViaLiftLowerH h sig m a #