From af34a7bf1ccdcfbc99d204afa00ec615916d5a45 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 4 Aug 2016 12:26:07 -0400 Subject: [PATCH] Haddock-friendly docs for Syntax. --- src/Syntax.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Syntax.hs b/src/Syntax.hs index 1357e2d8e..d7cc56f0c 100644 --- a/src/Syntax.hs +++ b/src/Syntax.hs @@ -8,9 +8,10 @@ import Test.QuickCheck hiding (Fixed) import SourceSpan -- | A node in an abstract syntax tree. -data Syntax - a -- ^ The type of leaves in the syntax tree, typically String, but possibly some datatype representing different leaves more precisely. - f -- ^ The type representing another level of the tree, e.g. the children of branches. Often Cofree or Fix or similar. +-- +-- 'a' is the type of leaves in the syntax tree, typically 'Text', but possibly some datatype representing different leaves more precisely. +-- 'f' is the type representing another level of the tree, e.g. the children of branches. Often 'Cofree', 'Free' or similar. +data Syntax a f -- | A terminal syntax node, e.g. an identifier, or atomic literal. = Leaf a -- | An ordered branch of child nodes, expected to be variadic in the grammar, e.g. a list of statements or uncurried function parameters.