Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
General functions that are useful in manipulating some Drasil types into
printable Contents
.
Synopsis
- enumBullet :: Reference -> [Sentence] -> LabelledContent
- enumBulletU :: [Sentence] -> Contents
- enumSimple :: Reference -> Integer -> Sentence -> [Sentence] -> LabelledContent
- enumSimpleU :: Integer -> Sentence -> [Sentence] -> Contents
- mkEnumSimpleD :: (Referable c, HasShortName c, Definition c) => [c] -> [Contents]
- lbldExpr :: ModelExpr -> Reference -> LabelledContent
- unlbldExpr :: ModelExpr -> Contents
- unlbldCode :: CodeExpr -> Contents
List Creation Functions
enumBullet :: Reference -> [Sentence] -> LabelledContent Source #
Creates a bulleted list.
enumBulletU :: [Sentence] -> Contents Source #
Same as enumBullet
but unlabelled.
enumSimple :: Reference -> Integer -> Sentence -> [Sentence] -> LabelledContent Source #
Currently Unused. Creates a simple bulleted list that labels things with a title and number:
- lb - Reference,
- s - start index for the enumeration,
- t - title of the list,
- l - list to be enumerated.
For example, if we want to create a list of data definitions, we could call the function as follows:
enumSimple _ 2 (S "DD") [def1, def2, ...]
And the resulting LabelledContent
would be rendered as:
- DD2: def1
- DD3: def2
- DD4: def3 ...
enumSimpleU :: Integer -> Sentence -> [Sentence] -> Contents Source #
Same as enumSimple
but unlabelled.
mkEnumSimpleD :: (Referable c, HasShortName c, Definition c) => [c] -> [Contents] Source #
Convenience function for transforming referable concepts into a bulleted list.
Used in drasil-docLang in making the assumptions, goals, and requirements sections.
Output is of the kind Concept Name: definition of concept
.
Displaying Expressions
lbldExpr :: ModelExpr -> Reference -> LabelledContent Source #
Displays a given expression and attaches a Reference
to it.
unlbldExpr :: ModelExpr -> Contents Source #
Same as eqUnR
except content is unlabelled (does not attach a Reference
).
unlbldCode :: CodeExpr -> Contents Source #
Unlabelled code expression