Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Contains Sentences and helpers functions.
Synopsis
- data Sentence where
- Ch :: SentenceStyle -> TermCapitalization -> UID -> Sentence
- SyCh :: UID -> Sentence
- Sy :: USymb -> Sentence
- S :: String -> Sentence
- P :: Symbol -> Sentence
- E :: ModelExpr -> Sentence
- Ref :: UID -> Sentence -> RefInfo -> Sentence
- Quote :: Sentence -> Sentence
- Percent :: Sentence
- (:+:) :: Sentence -> Sentence -> Sentence
- EmptyS :: Sentence
- data SentenceStyle
- data RefInfo
- data TermCapitalization
- (+:+) :: Sentence -> Sentence -> Sentence
- (+:+.) :: Sentence -> Sentence -> Sentence
- (+:) :: Sentence -> Sentence -> Sentence
- (!.) :: Sentence -> Sentence
- capSent :: Sentence -> Sentence
- headSent :: Int -> Sentence -> Sentence
- ch :: (HasUID c, HasSymbol c) => c -> Sentence
- eS :: ModelExpr -> Sentence
- eS' :: Express t => t -> Sentence
- sC :: Sentence -> Sentence -> Sentence
- sDash :: Sentence -> Sentence -> Sentence
- sParen :: Sentence -> Sentence
- sentencePlural :: UID -> Sentence
- sentenceShort :: UID -> Sentence
- sentenceSymb :: UID -> Sentence
- sentenceTerm :: UID -> Sentence
Types
Sentence
For writing Sentence
s via combining smaller elements.
Sentence
s are made up of some known vocabulary of things:
- units (their visual representation)
- words (via
String
s) - special characters
- accented letters
- references to specific layout objects
Ch :: SentenceStyle -> TermCapitalization -> UID -> Sentence | Ch looks up the term for a given |
SyCh :: UID -> Sentence | A branch of Ch dedicated to SymbolStyle only. |
Sy :: USymb -> Sentence | Converts a unit symbol into a usable Sentence form. |
S :: String -> Sentence | Constructor for |
P :: Symbol -> Sentence | Converts the graphical representation of a symbol into a usable Sentence form. |
E :: ModelExpr -> Sentence | Lifts an expression into a Sentence. |
Ref :: UID -> Sentence -> RefInfo -> Sentence | Takes a |
Quote :: Sentence -> Sentence | Adds quotation marks around a Sentence. |
Percent :: Sentence | Used for a % symbol. |
(:+:) :: Sentence -> Sentence -> Sentence infixr 5 | Direct concatenation of two Sentences (no implicit spaces!). |
EmptyS :: Sentence | Empty Sentence. |
Context Types
data SentenceStyle Source #
Used in Ch
constructor to determine the state of a term
(can record whether something is in plural form, a singular term, or in short form).
Holds any extra information needed for a Reference
, be it an equation, pages, a note, or nothing.
data TermCapitalization Source #
Functions
(+:+) :: Sentence -> Sentence -> Sentence Source #
Helper for concatenating two Sentence
s with a space between them.
(+:) :: Sentence -> Sentence -> Sentence Source #
Helper which concatenates two sentences using +:+
and appends a colon.
(!.) :: Sentence -> Sentence Source #
Helper which appends a period to the end of a Sentence
(used often as a post-fix operator).
headSent :: Int -> Sentence -> Sentence Source #
Helper which creates a Header with size s of the Sentence
.
sC :: Sentence -> Sentence -> Sentence Source #
Helper for concatenating two Sentence
s with a comma and space between them.
sDash :: Sentence -> Sentence -> Sentence Source #
Helper for concatenating two Sentence
s with a space-surrounded dash between them.
sentencePlural :: UID -> Sentence Source #
sentenceShort :: UID -> Sentence Source #
sentenceSymb :: UID -> Sentence Source #