drasil-printers-0.1.10.0: A framework for code and document generation for scientific software - Printers SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Printing.Helpers

Description

General helper functions for printing Drasil documents.

Synopsis

Documentation

bslash :: Doc Source #

Single backslash.

Basic text-rendering helper function.

dbs :: Doc Source #

Double backslash.

Basic text-rendering helper function.

assign :: Doc Source #

Variable assignment character ("=").

Basic text-rendering helper function.

eq :: Doc Source #

Equality character ("==").

Basic text-rendering helper function.

lt :: Doc Source #

Less than.

Basic text-rendering helper function.

gt :: Doc Source #

Greater than.

Basic text-rendering helper function.

leq :: Doc Source #

Less than or equal to.

Basic text-rendering helper function.

geq :: Doc Source #

Greater than or equal to.

Basic text-rendering helper function.

dlr :: Doc Source #

Dollar sign.

Basic text-rendering helper function.

ast :: Doc Source #

Asterisk.

Basic text-rendering helper function.

pls :: Doc Source #

Plus.

Basic text-rendering helper function.

hat :: Doc Source #

Hat symbol ("^").

Basic text-rendering helper function.

slash :: Doc Source #

Forward slash.

Basic text-rendering helper function.

hyph :: Doc Source #

Hyphen.

Basic text-rendering helper function.

tab :: Doc Source #

Tab.

Basic text-rendering helper function.

unders :: Doc Source #

Underscore.

Basic text-rendering helper function.

sq :: String -> Doc Source #

Square brackets.

Text-rendering helper for wrapping strings with brackets/braces.

br :: String -> Doc Source #

Curly braces.

Text-rendering helper for wrapping strings with brackets/braces.

dot :: Doc -> Doc Source #

Dot symbol (".")

Text-rendering helper for appending a period/decimal point (dot symbol) or a comma.

comm :: Doc -> Doc Source #

Comma (",")

Text-rendering helper for appending a period/decimal point (dot symbol) or a comma.

dollarDoc :: Doc -> Doc Source #

For wrapping $ on both sides of a Doc.

paren :: String -> String Source #

Wraps in parenthesis.

Basic plaintext (String) wrapping.

brace :: String -> String Source #

Wraps in curly braces.

Basic plaintext (String) wrapping.

dollar :: String -> String Source #

Wraps in dollar signs.

Basic plaintext (String) wrapping.

sqbrac :: String -> String Source #

Wraps in square brackets.

Basic plaintext (String) wrapping.

angbrac :: String -> String Source #

Wraps in angular brackets ("<>").

Basic plaintext (String) wrapping.

upcase :: String -> Doc Source #

Capitalize first letter of string.

Format strings and convert to Doc.

lowcase :: String -> Doc Source #

Make first letter lowercase.

Format strings and convert to Doc.

sufx :: Int -> String Source #

Appends a suffix for a number. Used only on single digit Ints.

sufxer :: Int -> String Source #

Similar to sufx but used on any sized Int.