Safe Haskell | Safe |
---|---|
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 = 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 = child `IsChildOf` father => Child (TDoc t child)
- class ToChildren a t father where
- class ToTDoc a t b where
- class AddAttrs a t b where
- 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 #
attr `IsAttributeOf` node => TAttr (t attr) attr |
type AttributesOf t node = [AttributeOf t node] Source #
class ToChildren a t father where Source #
toChildren :: a -> [ChildOf t father] Source #
ToChildren () t b Source # | |
ToChildren a t b => ToChildren [a] t b Source # | |
ToChildren a t b => ToChildren (Identity a) t b Source # | |
(ToChildren a t n, ToChildren b t n) => ToChildren (a, b) t n Source # | |
((~) (* -> *) t1 t2, (~) * a b) => ToChildren (ChildOf t1 a) t2 b Source # | |
((~) (* -> *) t1 t2, IsChildOf a b) => ToChildren (TDoc t1 a) t2 b Source # | |
(ToChildren a t n, ToChildren b t n, ToChildren c t n) => ToChildren (a, b, c) t n Source # | |
(Monad m, ToChildren (m w) t b, (~) * a ()) => ToChildren (WriterT w m a) t b Source # | |
class FromTDoc a t tag where Source #
FromTDoc a t tag => FromTDoc [a] t tag Source # | |
FromTDoc a t tag => FromTDoc (Identity a) t tag Source # | |
((~) (* -> *) t1 t2, IsChildOf b a) => FromTDoc (ChildOf t1 a) t2 b Source # | |
((~) (* -> *) t1 t2, (~) * a b) => FromTDoc (TDoc t1 a) t2 b Source # | |
(Monad m, FromTDoc w t tag, Monoid w, (~) * a ()) => FromTDoc (WriterT w m a) t tag Source # | |
type Star t node = forall children. ToChildren children t node => children -> 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 #