From 1cb36565026ac9ae9eea4e9ea5aee0ef9f11b510 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 15 Jul 2016 10:53:43 -0400 Subject: [PATCH] Uniform split rendering of branches. --- src/Renderer/Split.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Renderer/Split.hs b/src/Renderer/Split.hs index 0caf994d7..b9c47ca9a 100644 --- a/src/Renderer/Split.hs +++ b/src/Renderer/Split.hs @@ -112,8 +112,7 @@ wrapIn f p = f p instance (ToMarkup f, HasField fields Category, HasField fields Cost, HasField fields Range) => ToMarkup (Renderable (CofreeF (Syntax leaf) (Record fields) (f, Range))) where toMarkup (Renderable source (info :< syntax)) = (! A.data_ (stringValue (show (unCost (cost info))))) . classifyMarkup (category info) $ case syntax of Leaf _ -> span . string . toString $ slice (characterRange info) source - Indexed children -> ul . mconcat $ wrapIn li <$> contentElements source (characterRange info) children - Fixed children -> ul . mconcat $ wrapIn li <$> contentElements source (characterRange info) children + _ -> ul . mconcat $ wrapIn li <$> contentElements source (characterRange info) (toList syntax) instance (HasField fields Category, HasField fields Cost, HasField fields Range) => ToMarkup (Renderable (Term leaf (Record fields))) where toMarkup (Renderable source term) = Prologue.fst $ cata (\ t -> (toMarkup $ Renderable source t, characterRange (headF t))) term