From 1cfcbe3bf3e8762417ed9066e72615d7d4aab33c Mon Sep 17 00:00:00 2001 From: Yamada Ryo Date: Sun, 29 Oct 2023 19:00:48 +0900 Subject: [PATCH] [add] type synonyms for non-transformer versions. --- heftia/src/Control/Monad/Trans/Heftia/Church.hs | 3 +++ heftia/src/Control/Monad/Trans/Heftia/Tree.hs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/heftia/src/Control/Monad/Trans/Heftia/Church.hs b/heftia/src/Control/Monad/Trans/Heftia/Church.hs index e7a7818..07dbf4a 100644 --- a/heftia/src/Control/Monad/Trans/Heftia/Church.hs +++ b/heftia/src/Control/Monad/Trans/Heftia/Church.hs @@ -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 diff --git a/heftia/src/Control/Monad/Trans/Heftia/Tree.hs b/heftia/src/Control/Monad/Trans/Heftia/Tree.hs index 0571db7..9d8a617 100644 --- a/heftia/src/Control/Monad/Trans/Heftia/Tree.hs +++ b/heftia/src/Control/Monad/Trans/Heftia/Tree.hs @@ -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