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.AST

Description

Defines types similar to those in Drasil.Language, but better suited to printing.

Synopsis

Documentation

data LinkType Source #

Different types of links for referencing. May be internal, a citation, or external. A citation may also hold additional reference information.

Constructors

Internal 
Cite2 Spec 
External 

data Fence Source #

Holds the type of "text fencing" ("(), {}, |, ||").

Constructors

Paren 
Curly 
Norm 
Abs 

data OverSymb Source #

The "^" symbol.

Constructors

Hat 

data Fonts Source #

Different font effects (bold, emphasis).

Constructors

Bold 
Emph 

data Spacing Source #

Spacing is Thin.

Constructors

Thin 

type Label = Spec Source #

A Label is just a Expr (sentence).

data Expr Source #

Redefine the Expr type from Language.Drasil to be more suitable to printing.

Constructors

Dbl Double 
Int Integer 
Str String 
Case [(Expr, Expr)]

Case expressions

Mtx [[Expr]]

Matrix.

Row [Expr] 
Ident String 
Label String 
Spec Special

Special characters.

Sub Expr

Subscript.

Sup Expr

Superscript.

MO Ops 
Over OverSymb Expr

Holds an expression that needs a hat symbol "^"

Fenced Fence Fence Expr

Holds an expression that is surrounded with a Fence.

Font Fonts Expr

Holds an expression with a font.

Div Expr Expr

Fractions are a layout thing.

Sqrt Expr

Roots are also a layout thing. Just sqrt for now.

Spc Spacing

Holds the Spacing.

data Spec Source #

Redefine the Sentence type from Language.Drasil to be more suitable to printing.

Constructors

E Expr

Holds an expression.

S String

Holds a String.

Spec :+: Spec infixr 5

Concatenation.

Sp Special

Special characters.

Ref LinkType String Spec

Holds the actual reference of form LinkType, reference address, and display name

EmptyS

Empty sentence.

Quote Spec

Quotes are different in different languages.

HARDNL

Newline. | A title is just a sentence (Expr).

data ListType Source #

Different types of lists that contain an ItemType and may contain a label and a title. May be ordered, unordered, simple, descriptive, or for definitions. More suitable to printing.

data ItemType Source #

A list may contain an element or another list. More suitable to printing.

Constructors

Flat Spec 
Nested Spec ListType