module UVMHS.Lib.Pretty.RenderUndertags where
import UVMHS.Core
import UVMHS.Lib.TreeAnnote
import UVMHS.Lib.Sep
import UVMHS.Lib.Pretty.Annotation
import UVMHS.Lib.Pretty.Common
data RenderUTEnv = RenderUTEnv
{ RenderUTEnv -> 𝑂 (ℂ ∧ Formats)
renderUTEnvUnderFormat ∷ 𝑂 (ℂ ∧ Formats) }
makeLenses ''RenderUTEnv
renderUTEnv₀ ∷ RenderUTEnv
renderUTEnv₀ :: RenderUTEnv
renderUTEnv₀ = RenderUTEnv
{ renderUTEnvUnderFormat :: 𝑂 (ℂ ∧ Formats)
renderUTEnvUnderFormat = 𝑂 (ℂ ∧ Formats)
forall a. 𝑂 a
None }
data RenderUTState = RenderUTState
{ RenderUTState -> ℕ64
t2StateCol ∷ ℕ64
, RenderUTState -> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
t2StateUnders ∷ 𝐼 (ℕ64 ∧ ℕ64 ∧ ℂ ∧ Formats)
}
makeLenses ''RenderUTState
t2State₀ ∷ RenderUTState
t2State₀ :: RenderUTState
t2State₀ = RenderUTState
{ t2StateCol :: ℕ64
t2StateCol = ℕ -> ℕ64
𝕟64 ℕ
0
, t2StateUnders :: 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
t2StateUnders = 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
forall a. Null a => a
null
}
type RenderUTM = RWS RenderUTEnv SummaryO RenderUTState
newtype RenderUT = RenderUT { RenderUT -> RenderUTM ()
unRenderUT ∷ RenderUTM () }
onRenderUT ∷ (RenderUTM () → RenderUTM ()) → RenderUT → RenderUT
onRenderUT :: (RenderUTM () -> RenderUTM ()) -> RenderUT -> RenderUT
onRenderUT RenderUTM () -> RenderUTM ()
f (RenderUT RenderUTM ()
xM) = RenderUTM () -> RenderUT
RenderUT (RenderUTM () -> RenderUT) -> RenderUTM () -> RenderUT
forall a b. (a -> b) -> a -> b
$ RenderUTM () -> RenderUTM ()
f RenderUTM ()
xM
onRenderUT2 ∷ (RenderUTM () → RenderUTM () → RenderUTM ()) → RenderUT → RenderUT → RenderUT
onRenderUT2 :: (RenderUTM () -> RenderUTM () -> RenderUTM ())
-> RenderUT -> RenderUT -> RenderUT
onRenderUT2 RenderUTM () -> RenderUTM () -> RenderUTM ()
f (RenderUT RenderUTM ()
xM₁) (RenderUT RenderUTM ()
xM₂) = RenderUTM () -> RenderUT
RenderUT (RenderUTM () -> RenderUT) -> RenderUTM () -> RenderUT
forall a b. (a -> b) -> a -> b
$ RenderUTM () -> RenderUTM () -> RenderUTM ()
f RenderUTM ()
xM₁ RenderUTM ()
xM₂
instance Null RenderUT where null :: RenderUT
null = RenderUTM () -> RenderUT
RenderUT RenderUTM ()
forall (m :: * -> *). Return m => m ()
skip
instance Append RenderUT where ⧺ :: RenderUT -> RenderUT -> RenderUT
(⧺) = (RenderUTM () -> RenderUTM () -> RenderUTM ())
-> RenderUT -> RenderUT -> RenderUT
onRenderUT2 RenderUTM () -> RenderUTM () -> RenderUTM ()
forall (m :: * -> *) a b. Bind m => m a -> m b -> m b
(≫)
instance Monoid RenderUT
buildUndertags ∷ ℕ64 → RenderUTM ()
buildUndertags :: ℕ64 -> RenderUTM ()
buildUndertags ℕ64
l = do
𝑂 (ℂ ∧ Formats)
uf ← (RenderUTEnv ⟢ 𝑂 (ℂ ∧ Formats))
-> RWST RenderUTEnv SummaryO RenderUTState ID (𝑂 (ℂ ∧ Formats))
forall r'.
(RenderUTEnv ⟢ r') -> RWST RenderUTEnv SummaryO RenderUTState ID r'
forall r (m :: * -> *) r'. MonadReader r m => (r ⟢ r') -> m r'
askL RenderUTEnv ⟢ 𝑂 (ℂ ∧ Formats)
renderUTEnvUnderFormatL
case 𝑂 (ℂ ∧ Formats)
uf of
𝑂 (ℂ ∧ Formats)
None → RenderUTM ()
forall (m :: * -> *). Return m => m ()
skip
Some (ℂ
c :* Formats
fm) → do
ℕ64
col ← (RenderUTState ⟢ ℕ64)
-> RWST RenderUTEnv SummaryO RenderUTState ID ℕ64
forall (m :: * -> *) s a.
(Monad m, MonadState s m) =>
(s ⟢ a) -> m a
getL RenderUTState ⟢ ℕ64
t2StateColL
(RenderUTState ⟢ 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
-> (𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
-> RenderUTM ()
forall (m :: * -> *) s a.
(Monad m, MonadState s m) =>
(s ⟢ a) -> (a -> a) -> m ()
modifyL RenderUTState ⟢ 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
t2StateUndersL ((𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
-> RenderUTM ())
-> (𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
-> RenderUTM ()
forall a b. (a -> b) -> a -> b
$ 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
forall a. Append a => a -> a -> a
pospend (𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
forall a b. (a -> b) -> a -> b
$ (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats) -> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
forall a t. Single a t => a -> t
single (ℕ64
col ℕ64 -> ℕ64 -> ℕ64 ∧ ℕ64
forall a b. a -> b -> a ∧ b
:* ℕ64
l (ℕ64 ∧ ℕ64) -> ℂ -> (ℕ64 ∧ ℕ64) ∧ ℂ
forall a b. a -> b -> a ∧ b
:* ℂ
c ((ℕ64 ∧ ℕ64) ∧ ℂ) -> Formats -> ((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats
forall a b. a -> b -> a ∧ b
:* Formats
fm)
renderNewline ∷ ℕ64 → RenderUTM ()
renderNewline :: ℕ64 -> RenderUTM ()
renderNewline ℕ64
n = do
SummaryO -> RenderUTM ()
forall o (m :: * -> *). MonadWriter o m => o -> m ()
tell (SummaryO -> RenderUTM ()) -> SummaryO -> RenderUTM ()
forall a b. (a -> b) -> a -> b
$ Sep () (𝐼A ChunkO) -> SummaryO
summaryChunksO (Sep () (𝐼A ChunkO) -> SummaryO) -> Sep () (𝐼A ChunkO) -> SummaryO
forall a b. (a -> b) -> a -> b
$ () -> Sep () (𝐼A ChunkO)
forall a i. Null a => i -> Sep i a
sepI () Sep () (𝐼A ChunkO) -> Sep () (𝐼A ChunkO) -> Sep () (𝐼A ChunkO)
forall a. Append a => a -> a -> a
⧺ 𝐼A ChunkO -> Sep () (𝐼A ChunkO)
forall i a. a -> Sep i a
SepE (ChunkO -> 𝐼A ChunkO
forall a t. Single a t => a -> t
single (ChunkO -> 𝐼A ChunkO) -> ChunkO -> 𝐼A ChunkO
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ChunkO
PaddingChunkO ℕ64
n)
(RenderUTState ⟢ ℕ64) -> ℕ64 -> RenderUTM ()
forall (m :: * -> *) s a.
(Monad m, MonadState s m) =>
(s ⟢ a) -> a -> m ()
putL RenderUTState ⟢ ℕ64
t2StateColL ℕ64
n
renderRaw ∷ ℕ64 → 𝕊 → RenderUTM ()
renderRaw :: ℕ64 -> 𝕊 -> RenderUTM ()
renderRaw ℕ64
l 𝕊
s = do
SummaryO -> RenderUTM ()
forall o (m :: * -> *). MonadWriter o m => o -> m ()
tell (SummaryO -> RenderUTM ()) -> SummaryO -> RenderUTM ()
forall a b. (a -> b) -> a -> b
$ Sep () (𝐼A ChunkO) -> SummaryO
summaryChunksO (Sep () (𝐼A ChunkO) -> SummaryO) -> Sep () (𝐼A ChunkO) -> SummaryO
forall a b. (a -> b) -> a -> b
$ 𝐼A ChunkO -> Sep () (𝐼A ChunkO)
forall i a. a -> Sep i a
SepE (𝐼A ChunkO -> Sep () (𝐼A ChunkO))
-> 𝐼A ChunkO -> Sep () (𝐼A ChunkO)
forall a b. (a -> b) -> a -> b
$ ChunkO -> 𝐼A ChunkO
forall a t. Single a t => a -> t
single (ChunkO -> 𝐼A ChunkO) -> ChunkO -> 𝐼A ChunkO
forall a b. (a -> b) -> a -> b
$ ℕ64 -> 𝕊 -> ChunkO
RawChunkO ℕ64
l 𝕊
s
(RenderUTState ⟢ ℕ64) -> (ℕ64 -> ℕ64) -> RenderUTM ()
forall (m :: * -> *) s a.
(Monad m, MonadState s m) =>
(s ⟢ a) -> (a -> a) -> m ()
modifyL RenderUTState ⟢ ℕ64
t2StateColL ((ℕ64 -> ℕ64) -> RenderUTM ()) -> (ℕ64 -> ℕ64) -> RenderUTM ()
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ℕ64 -> ℕ64
forall a. Plus a => a -> a -> a
(+) ℕ64
l
renderPadding ∷ ℕ64 → RenderUTM ()
renderPadding :: ℕ64 -> RenderUTM ()
renderPadding ℕ64
n =
case ℕ64
n ℕ64 -> ℕ64 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ64
forall a. Zero a => a
zero of
𝔹
True → RenderUTM ()
forall (m :: * -> *). Return m => m ()
skip
𝔹
False → do
SummaryO -> RenderUTM ()
forall o (m :: * -> *). MonadWriter o m => o -> m ()
tell (SummaryO -> RenderUTM ()) -> SummaryO -> RenderUTM ()
forall a b. (a -> b) -> a -> b
$ Sep () (𝐼A ChunkO) -> SummaryO
summaryChunksO (Sep () (𝐼A ChunkO) -> SummaryO) -> Sep () (𝐼A ChunkO) -> SummaryO
forall a b. (a -> b) -> a -> b
$ 𝐼A ChunkO -> Sep () (𝐼A ChunkO)
forall i a. a -> Sep i a
SepE (𝐼A ChunkO -> Sep () (𝐼A ChunkO))
-> 𝐼A ChunkO -> Sep () (𝐼A ChunkO)
forall a b. (a -> b) -> a -> b
$ ChunkO -> 𝐼A ChunkO
forall a t. Single a t => a -> t
single (ChunkO -> 𝐼A ChunkO) -> ChunkO -> 𝐼A ChunkO
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ChunkO
PaddingChunkO ℕ64
n
(RenderUTState ⟢ ℕ64) -> (ℕ64 -> ℕ64) -> RenderUTM ()
forall (m :: * -> *) s a.
(Monad m, MonadState s m) =>
(s ⟢ a) -> (a -> a) -> m ()
modifyL RenderUTState ⟢ ℕ64
t2StateColL ((ℕ64 -> ℕ64) -> RenderUTM ()) -> (ℕ64 -> ℕ64) -> RenderUTM ()
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ℕ64 -> ℕ64
forall a. Plus a => a -> a -> a
(+) ℕ64
n
renderUndertags ∷ RenderUTM ()
renderUndertags :: RenderUTM ()
renderUndertags = do
𝐿 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
us ← 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats) -> 𝐿 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
forall a t. ToIter a t => t -> 𝐿 a
list (𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐿 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
-> RWST
RenderUTEnv
SummaryO
RenderUTState
ID
(𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
-> RWST
RenderUTEnv
SummaryO
RenderUTState
ID
(𝐿 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
^$ (RenderUTState ⟢ 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
-> RWST
RenderUTEnv
SummaryO
RenderUTState
ID
(𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
forall (m :: * -> *) s a.
(Monad m, MonadState s m) =>
(s ⟢ a) -> m a
getL RenderUTState ⟢ 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
t2StateUndersL
(RenderUTState ⟢ 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats))
-> 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats) -> RenderUTM ()
forall (m :: * -> *) s a.
(Monad m, MonadState s m) =>
(s ⟢ a) -> a -> m ()
putL RenderUTState ⟢ 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
t2StateUndersL 𝐼 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
forall a. Null a => a
null
case 𝐿 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
us 𝐿 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> 𝐿 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats) -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ 𝐿 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
forall a. Null a => a
null of
𝔹
True → RenderUTM ()
forall (m :: * -> *). Return m => m ()
skip
𝔹
False → do
ℕ64 -> RenderUTM ()
renderNewline ℕ64
forall a. Zero a => a
zero
𝐿 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
-> ((((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats) -> RenderUTM ()) -> RenderUTM ()
forall (m :: * -> *) a t.
(Monad m, ToIter a t) =>
t -> (a -> m ()) -> m ()
eachOn 𝐿 (((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats)
us (((((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats) -> RenderUTM ()) -> RenderUTM ())
-> ((((ℕ64 ∧ ℕ64) ∧ ℂ) ∧ Formats) -> RenderUTM ()) -> RenderUTM ()
forall a b. (a -> b) -> a -> b
$ \ (ℕ64
colf :* ℕ64
l :* ℂ
c :* Formats
fm) → do
ℕ64
col ← (RenderUTState ⟢ ℕ64)
-> RWST RenderUTEnv SummaryO RenderUTState ID ℕ64
forall (m :: * -> *) s a.
(Monad m, MonadState s m) =>
(s ⟢ a) -> m a
getL RenderUTState ⟢ ℕ64
t2StateColL
ℕ64 -> RenderUTM ()
renderPadding (ℕ64 -> RenderUTM ()) -> ℕ64 -> RenderUTM ()
forall a b. (a -> b) -> a -> b
$ ℕ64
colf ℕ64 -> ℕ64 -> ℕ64
forall a. Minus a => a -> a -> a
- ℕ64
col
(SummaryO -> SummaryO) -> RenderUTM () -> RenderUTM ()
forall (m :: * -> *) o a.
(Monad m, MonadWriter o m) =>
(o -> o) -> m a -> m a
mapOut (Formats -> SummaryO -> SummaryO
annotateSummaryO Formats
fm) (RenderUTM () -> RenderUTM ()) -> RenderUTM () -> RenderUTM ()
forall a b. (a -> b) -> a -> b
$ ℕ64 -> 𝕊 -> RenderUTM ()
renderRaw ℕ64
l (𝕊 -> RenderUTM ()) -> 𝕊 -> RenderUTM ()
forall a b. (a -> b) -> a -> b
$ 𝐼 ℂ -> 𝕊
forall t. ToIter ℂ t => t -> 𝕊
string (𝐼 ℂ -> 𝕊) -> 𝐼 ℂ -> 𝕊
forall a b. (a -> b) -> a -> b
$ ℕ -> ℂ -> 𝐼 ℂ
forall n a. (Eq n, Zero n, One n, Plus n) => n -> a -> 𝐼 a
replicate (ℕ64 -> ℕ
forall a. ToNat a => a -> ℕ
nat ℕ64
l) ℂ
c
renderChunkUndertags ∷ ChunkI → RenderUTM ()
renderChunkUndertags :: ChunkI -> RenderUTM ()
renderChunkUndertags = \case
RawChunkI ℕ64
l 𝕊
s → do ℕ64 -> RenderUTM ()
buildUndertags ℕ64
l ; ℕ64 -> 𝕊 -> RenderUTM ()
renderRaw ℕ64
l 𝕊
s
NewlineChunkI ℕ64
n → do RenderUTM ()
renderUndertags ; ℕ64 -> RenderUTM ()
renderNewline ℕ64
n
annotateRenderUT ∷ Annotation → RenderUTM () → RenderUTM ()
annotateRenderUT :: Annotation -> RenderUTM () -> RenderUTM ()
annotateRenderUT (Annotation Formats
fm 𝑂 (ℂ ∧ Formats)
ut) = (SummaryO -> SummaryO) -> RenderUTM () -> RenderUTM ()
forall (m :: * -> *) o a.
(Monad m, MonadWriter o m) =>
(o -> o) -> m a -> m a
mapOut (Formats -> SummaryO -> SummaryO
annotateSummaryO Formats
fm) (RenderUTM () -> RenderUTM ())
-> (RenderUTM () -> RenderUTM ()) -> RenderUTM () -> RenderUTM ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ (RenderUTEnv ⟢ 𝑂 (ℂ ∧ Formats))
-> (𝑂 (ℂ ∧ Formats) -> 𝑂 (ℂ ∧ Formats))
-> RenderUTM ()
-> RenderUTM ()
forall (m :: * -> *) r₁ r₂ a.
(Monad m, MonadReader r₁ m) =>
(r₁ ⟢ r₂) -> (r₂ -> r₂) -> m a -> m a
mapEnvL RenderUTEnv ⟢ 𝑂 (ℂ ∧ Formats)
renderUTEnvUnderFormatL (𝑂 (ℂ ∧ Formats) -> 𝑂 (ℂ ∧ Formats) -> 𝑂 (ℂ ∧ Formats)
forall a. 𝑂 a -> 𝑂 a -> 𝑂 a
first 𝑂 (ℂ ∧ Formats)
ut)
compileRenderUT ∷ TreeI → RenderUT
compileRenderUT :: TreeI -> RenderUT
compileRenderUT TreeI
rd = (RenderUTM () -> RenderUTM ()) -> RenderUT -> RenderUT
onRenderUT (\ RenderUTM ()
xM → RenderUTM ()
xM RenderUTM () -> RenderUTM () -> RenderUTM ()
forall (m :: * -> *) a b. Bind m => m a -> m b -> m b
≫ RenderUTM ()
renderUndertags) (RenderUT -> RenderUT) -> RenderUT -> RenderUT
forall a b. (a -> b) -> a -> b
$ TreeI
-> forall b.
Monoid b =>
(𝐼 ChunkI -> b) -> (Annotation -> b -> b) -> b
forall i a.
𝑇V i a -> forall b. Monoid b => (a -> b) -> (i -> b -> b) -> b
un𝑇V TreeI
rd 𝐼 ChunkI -> RenderUT
fₑ Annotation -> RenderUT -> RenderUT
fₐ
where
fₑ :: 𝐼 ChunkI -> RenderUT
fₑ = RenderUTM () -> RenderUT
RenderUT (RenderUTM () -> RenderUT)
-> (𝐼 ChunkI -> RenderUTM ()) -> 𝐼 ChunkI -> RenderUT
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ (ChunkI -> RenderUTM ()) -> 𝐼 ChunkI -> RenderUTM ()
forall (m :: * -> *) a t.
(Monad m, ToIter a t) =>
(a -> m ()) -> t -> m ()
eachWith ChunkI -> RenderUTM ()
renderChunkUndertags
fₐ :: Annotation -> RenderUT -> RenderUT
fₐ = (RenderUTM () -> RenderUTM ()) -> RenderUT -> RenderUT
onRenderUT ((RenderUTM () -> RenderUTM ()) -> RenderUT -> RenderUT)
-> (Annotation -> RenderUTM () -> RenderUTM ())
-> Annotation
-> RenderUT
-> RenderUT
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Annotation -> RenderUTM () -> RenderUTM ()
annotateRenderUT
execRenderUT ∷ TreeI → SummaryO
execRenderUT :: TreeI -> SummaryO
execRenderUT = RenderUTEnv
-> RenderUTState
-> RWS RenderUTEnv SummaryO RenderUTState SummaryO
-> SummaryO
forall r o s a. r -> s -> RWS r o s a -> a
evalRWS RenderUTEnv
renderUTEnv₀ RenderUTState
t2State₀ (RWS RenderUTEnv SummaryO RenderUTState SummaryO -> SummaryO)
-> (RenderUTM ()
-> RWS RenderUTEnv SummaryO RenderUTState SummaryO)
-> RenderUTM ()
-> SummaryO
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ RenderUTM () -> RWS RenderUTEnv SummaryO RenderUTState SummaryO
forall o (m :: * -> *) a. (Monad m, MonadWriter o m) => m a -> m o
retOut (RenderUTM () -> SummaryO)
-> (RenderUT -> RenderUTM ()) -> RenderUT -> SummaryO
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ RenderUT -> RenderUTM ()
unRenderUT (RenderUT -> SummaryO) -> (TreeI -> RenderUT) -> TreeI -> SummaryO
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ TreeI -> RenderUT
compileRenderUT