Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- 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 . attr `IsAttributeOf` 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 . child `IsChildOf` 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. child `IsChildOf` node => TDoc t child -> TDoc t node
- type Plus t node = forall children child. (child `IsChildOf` 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]
- (<<) :: a `IsChildOf` 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 . attr `IsAttributeOf` node => TAttr (t attr) attr |
type AttributesOf t node = [AttributeOf t node] Source
((~) (* -> *) t HtmlTag, IsNode a) => HTML (TDoc t a) | |
((~) (* -> *) t1 t2, (~) * a b) => FromTDoc (TDoc t1 a) t2 b | |
((~) (* -> *) t1 t2, (~) * a b) => AddAttrs (TDoc t1 a) t2 b | |
((~) (* -> *) t1 t2, (~) * a b) => ToTDoc (TDoc t1 a) t2 b | |
((~) (* -> *) t1 t2, IsChildOf a b) => ToChildren (TDoc t1 a) t2 b |
forall child . child `IsChildOf` father => Child (TDoc t child) |
class ToChildren a t father where Source
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 | |
(Monad m, ToChildren (m w) t b, (~) * a ()) => ToChildren (WriterT w m a) t b |
class ToTDoc a t b where Source
(LeafTags t, (~) * a Leaf) => ToTDoc Char t a | |
(LeafTags t, (~) * a Leaf) => ToTDoc ByteString t a | |
(LeafTags t, (~) * a Leaf) => ToTDoc ByteString t a | |
(LeafTags t, (~) * b Char, (~) * a Leaf) => ToTDoc [b] t a | |
ToTDoc a t b => ToTDoc (Identity a) t b | |
((~) (* -> *) t1 t2, (~) * a b) => ToTDoc (TDoc t1 a) t2 b | |
(Monad m, ToTDoc (m w) t b, (~) * a ()) => ToTDoc (WriterT w m a) t b |
class AddAttrs a t b where Source
(!) :: a -> AttributesOf t b -> a infixl 8 Source
type Star t node = forall children. ToChildren children t node => children -> TDoc t node Source
type Unary t node = forall child. child `IsChildOf` node => TDoc t child -> TDoc t node Source
type Plus t node = forall children child. (child `IsChildOf` node, ToChildren children t node) => TDoc t child -> children -> TDoc t node Source
(+++) :: (ToChildren a t tag, ToChildren b t tag) => a -> b -> [ChildOf t tag] infixr 2 Source
(<<) :: a `IsChildOf` b => (c -> TDoc t a) -> c -> PutM (ChildOf t b) infixr 7 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