From 8b97635c41c998e6190f89c9883b2dcac5d8df09 Mon Sep 17 00:00:00 2001 From: defanor Date: Fri, 22 Dec 2017 02:08:51 +0300 Subject: Refine documentation annotations and function names --- Pancake/Rendering.hs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Pancake/Rendering.hs') diff --git a/Pancake/Rendering.hs b/Pancake/Rendering.hs index 5f7e31f..06181e3 100644 --- a/Pancake/Rendering.hs +++ b/Pancake/Rendering.hs @@ -96,11 +96,18 @@ data RS = RS { indentationLevel :: Int -- | This is what gets rendered. data RendererOutput = RLink URI + -- ^ An URI reference. | RNote [RendererOutput] + -- ^ A note. | RLine StyledLine + -- ^ A line to render. | RIdentifier String Int + -- ^ An identifier. | RBlock Int Int - -- ^ number, start line, end line + -- ^ A fixed block's position (start line and end + -- line). These blocks reflect semantics and don't + -- vary as the terminal width changes, so they are + -- safe to rely on for position retention. deriving (Show, Eq) -- | Show a reference. @@ -125,7 +132,7 @@ rIdentifiers [] = [] rIdentifiers (RIdentifier s i:xs) = (s, i) : rIdentifiers xs rIdentifiers (_:xs) = rIdentifiers xs --- | Extracts block positions. +-- | Extracts fixed block positions. rBlocks :: [RendererOutput] -> [(Int, Int)] rBlocks [] = [] rBlocks (RBlock s e:xs) = (s, e) : rBlocks xs -- cgit v1.2.3