Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Document
- type LineNumber = Int
- type CharNumber = Int
- data Loc
- data Note
- data Named a
- data DocumentClassKind
- data DocumentClss
- data Star
- data Coord
- data Percentage
- data TexUnit
- data LatexLength
- data RowSpec a
- data LocSpec
- data Pos
- data LatexPaperSize
- data Row cell
- data PackageName
- data Key
- data SaveBin
- data LatexState
- type TexDecl = LatexM TexDcl
- type LatexItem = LatexM LatexItm
- type ParItem = LatexM ParItm
- type MathDecl = LatexM MathDcl
- data AnyItem
- data MathItem
- type ListItem = LatexM ListItm
- type PreambleItem = LatexM PreambleItm
- type DocumentClass = LatexM DocumentClss
- data LatexM a
- data Encoding
- data Arg a
- data MathDcl
- data AnyItm
- data PreambleItm
- data TexDcl
- data LatexItm
- data ParItm
- data MathItm
- data ListItm
- type TexDeclW = Writer TexDecl ()
- type LatexItemW = Writer LatexItem ()
- type ParItemW = Writer ParItem ()
- type MathDeclW = Writer MathDecl ()
- type MathItemW = Writer MathItem ()
- type PreambleItemW = Writer PreambleItem ()
- module Language.LaTeX.Builder.MonoidUtils
- (!$) :: Monoid b => (a -> b) -> a -> Writer b ()
- ($?) :: (a -> b) -> Writer a () -> b
- (!$?) :: Monoid b => (a -> b) -> Writer a () -> Writer b ()
- tell :: MonadWriter w m => w -> m ()
- type Writer w = WriterT w Identity
- (★) :: Star
- class Monoid a where
- printLatexDocument :: LatexM Document -> IO ()
- data ViewOpts = ViewOpts {}
- quickView :: ViewOpts -> FilePath -> LatexM Document -> IO ()
- myViewOpts :: ViewOpts
- testViewOpts :: ViewOpts
- showLaTeX :: LatexM Document -> Either ErrorMessage String
- runLatexM :: LatexM a -> Either ErrorMessage a
Types
type LineNumber = Int Source
type CharNumber = Int Source
data DocumentClassKind Source
data Percentage Source
data LatexLength Source
data LatexPaperSize Source
data PackageName Source
data LatexState Source
type PreambleItem = LatexM PreambleItm Source
type DocumentClass = LatexM DocumentClss Source
Monad LatexM Source | |
Functor LatexM Source | |
Applicative LatexM Source | |
Alternative LatexM Source | |
MonadPlus LatexM Source | |
MonadError ErrorMessage LatexM Source | |
Eq a => Eq (LatexM a) Source | |
Fractional a => Fractional (LatexM a) Source | |
Data a => Data (LatexM a) Source | |
Num a => Num (LatexM a) Source | |
Show a => Show (LatexM a) Source | |
IsString a => IsString (LatexM a) Source | |
Monoid a => Monoid (LatexM a) Source | |
Greek (LatexM LatexItm) Source |
Type for encodings used in commands like.
usepackage[utf8]{inputenc}
, that we can
express as useInputenc
utf8
.
Internal types
data PreambleItm Source
Writer type aliases
type LatexItemW = Writer LatexItem () Source
type PreambleItemW = Writer PreambleItem () Source
Utils
tell :: MonadWriter w m => w -> m ()
is an action that produces the output tell
ww
.
class Monoid a where
The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following laws:
mappend mempty x = x
mappend x mempty = x
mappend x (mappend y z) = mappend (mappend x y) z
mconcat =
foldr
mappend mempty
The method names refer to the monoid of lists under concatenation, but there are many other instances.
Some types can be viewed as a monoid in more than one way,
e.g. both addition and multiplication on numbers.
In such cases we often define newtype
s and make those instances
of Monoid
, e.g. Sum
and Product
.
mempty :: a
Identity of mappend
mappend :: a -> a -> a
An associative operation
mconcat :: [a] -> a
Fold a list using the monoid.
For most types, the default definition for mconcat
will be
used, but the function is included in the class definition so
that an optimized version can be provided for specific types.
Monoid Ordering | |
Monoid () | |
Monoid All | |
Monoid Any | |
Monoid Builder | |
Monoid IntSet | |
Monoid MathItem | |
Monoid LatexLength | |
Monoid MathItm | |
Monoid ParItm | |
Monoid Star | |
Monoid LatexItm | |
Monoid PreambleItm | |
Monoid [a] | |
Ord a => Monoid (Max a) | |
Ord a => Monoid (Min a) | |
Monoid a => Monoid (Dual a) | |
Monoid (Endo a) | |
Num a => Monoid (Sum a) | |
Num a => Monoid (Product a) | |
Monoid (First a) | |
Monoid (Last a) | |
Monoid a => Monoid (Maybe a) | Lift a semigroup into |
Monoid (IntMap a) | |
Ord a => Monoid (Set a) | |
Monoid a => Monoid (LatexM a) | |
Monoid b => Monoid (a -> b) | |
(Monoid a, Monoid b) => Monoid (a, b) | |
Monoid a => Monoid (Const a b) | |
Monoid (Proxy k s) | |
(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) | |
Alternative f => Monoid (Alt * f a) | |
(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) | |
(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) |
printLatexDocument :: LatexM Document -> IO () Source
runLatexM :: LatexM a -> Either ErrorMessage a Source