mirror of
https://github.com/sayo-hs/heftia.git
synced 2024-11-26 23:05:04 +03:00
[add] type synonyms for non-transformer versions.
This commit is contained in:
parent
b65cff2731
commit
1cfcbe3bf3
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user