- class IsNode node
- class IsAttribute attr
- class (IsNode father, IsNode child) => IsChildOf child father
- class (IsAttribute attr, IsNode node) => IsAttributeOf attr node
- class IsNode a => IsBlockOrInline a
- class IsBlockOrInline a => IsInline a
- class IsBlockOrInline a => IsBlock a
- data AttributeOf t node = forall attr . IsAttributeOf attr node => TAttr (t attr) attr
- type AttributesOf t node = [AttributeOf t node]
- data TDoc t tag = TNode {
- tTag :: t tag
- tAttrs :: AttributesOf t tag
- tChildren :: [ChildOf t tag]
- data ChildOf t father = forall child . IsChildOf child father => Child (TDoc t child)
- class ToChildren a t father where
- toChildren :: a -> [ChildOf t father]
- class ToTDoc a t b where
- class AddAttrs a t b where
- (!) :: a -> AttributesOf t b -> a
- class FromTDoc a t tag where
- type PutM a = Writer [a] ()
- type Star t node = forall children. ToChildren children t node => children -> TDoc t node
- type Nullary t node = TDoc t node
- type Unary t node = forall child. IsChildOf child node => TDoc t child -> TDoc t node
- type Plus t node = forall children child. (IsChildOf child node, ToChildren children t node) => TDoc t child -> children -> TDoc t node
- (+++) :: (ToChildren a t tag, ToChildren b t tag) => a -> b -> [ChildOf t tag]
- (<<) :: IsChildOf a b => (c -> TDoc t a) -> c -> PutM (ChildOf t b)
- put :: ToChildren children t father => children -> PutM (ChildOf t father)
- tStar :: t a -> Star t a
- tNullary :: t a -> Nullary t a
- tUnary :: t a -> Unary t a
- tPlus :: t a -> Plus t a
Documentation
class IsAttribute attr Source
class (IsNode father, IsNode child) => IsChildOf child father Source
class (IsAttribute attr, IsNode node) => IsAttributeOf attr node Source
class IsNode a => IsBlockOrInline a Source
class IsBlockOrInline a => IsInline a Source
class IsBlockOrInline a => IsBlock a Source
data AttributeOf t node Source
forall attr . IsAttributeOf attr node => TAttr (t attr) attr |
type AttributesOf t node = [AttributeOf t node]Source
class ToChildren a t father whereSource
toChildren :: a -> [ChildOf t father]Source
(LeafTags t, IsChildOf Leaf a) => ToChildren Char t a | |
ToChildren () t b | |
(LeafTags t, IsChildOf Leaf a) => ToChildren ByteString t a | |
(LeafTags t, IsChildOf Leaf a) => ToChildren ByteString t a | |
ToChildren a t b => ToChildren [a] t b | |
ToChildren a t b => ToChildren (Identity a) t b | |
(ToChildren a t n, ToChildren b t n) => ToChildren (a, b) t n | |
(t1 ~ t2, a ~ b) => ToChildren (ChildOf t1 a) t2 b | |
(t1 ~ t2, IsChildOf a b) => ToChildren (TDoc t1 a) t2 b | |
(ToChildren a t n, ToChildren b t n, ToChildren c t n) => ToChildren (a, b, c) t n | |
(a ~ (), Monad m, ToChildren (m w) t b) => ToChildren (WriterT w m a) t b |
class ToTDoc a t b whereSource
(a ~ Leaf, LeafTags t) => ToTDoc Char t a | |
(a ~ Leaf, LeafTags t) => ToTDoc ByteString t a | |
(a ~ Leaf, LeafTags t) => ToTDoc ByteString t a | |
(b ~ Char, a ~ Leaf, LeafTags t) => ToTDoc [b] t a | |
ToTDoc a t b => ToTDoc (Identity a) t b | |
(t1 ~ t2, a ~ b) => ToTDoc (TDoc t1 a) t2 b | |
(a ~ (), Monad m, ToTDoc (m w) t b) => ToTDoc (WriterT w m a) t b |
class AddAttrs a t b whereSource
(!) :: a -> AttributesOf t b -> aSource
type Star t node = forall children. ToChildren children t node => children -> TDoc t nodeSource
type Plus t node = forall children child. (IsChildOf child node, ToChildren children t node) => TDoc t child -> children -> TDoc t nodeSource
(+++) :: (ToChildren a t tag, ToChildren b t tag) => a -> b -> [ChildOf t tag]Source
(<<) :: IsChildOf a b => (c -> TDoc t a) -> c -> PutM (ChildOf t b)Source
This operator is an infix sugar for put
paragraph << do ...
is equal to put $ paragraph $ do ...
.
put :: ToChildren children t father => children -> PutM (ChildOf t father)Source