[add] type synonyms for non-transformer versions.

This commit is contained in:
Yamada Ryo 2023-10-29 19:00:48 +09:00
parent b65cff2731
commit 1cfcbe3bf3
No known key found for this signature in database
GPG Key ID: AAE3C7A542B02DBF
2 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import Control.Effect.Class (type (~>))
import Control.Effect.Class.Machinery.HFunctor (hfmap)
import Control.Heftia.Trans (TransHeftia (..))
import Control.Monad (join)
import Control.Monad.Identity (Identity)
import Control.Monad.Trans (MonadTrans, lift)
import Control.Monad.Trans.Cont (ContT (ContT), runContT)
import Control.Monad.Trans.Heftia (MonadTransHeftia, elaborateMK, reelaborateMK)
@ -75,3 +76,5 @@ instance MonadTransHeftia HeftiaChurchT where
reelaborateMK f = elaborateMK f . hoistHeftia liftLowerHT
{-# INLINE reelaborateMK #-}
type HeftiaChurch h = HeftiaChurchT h Identity

View File

@ -16,6 +16,7 @@ module Control.Monad.Trans.Heftia.Tree where
import Control.Effect.Class.Machinery.HFunctor (HFunctor, hfmap)
import Control.Monad (join, (<=<))
import Control.Monad.Cont (ContT (ContT), runContT)
import Control.Monad.Identity (Identity)
import Control.Monad.Trans (MonadTrans)
import Control.Monad.Trans.Free (FreeF (Free, Pure))
import Control.Monad.Trans.Heftia.Church (HeftiaChurchT (HeftiaChurchT), runHeftiaChurchT)
@ -59,3 +60,5 @@ fromChurchHeftia (HeftiaChurchT f) =
(hfmap (unHeftiaTreeT . fromChurchHeftia) h)
)
(pure . pure)
type HeftiaTree h = HeftiaTreeT h Identity