|
|
|
|
Synopsis |
|
| | newtype Name ident = Name ident | | mapName :: (name0 -> name1) -> T name0 string -> T name1 string | | isOpen :: T name string -> Bool | | maybeOpen :: T name string -> Maybe (Name name, [T name string]) | | isClose :: T name string -> Bool | | maybeClose :: T name string -> Maybe (Name name) | | isText :: T name string -> Bool | | maybeText :: T name string -> Maybe string | | innerText :: Monoid string => [T name string] -> string | | isComment :: T name string -> Bool | | maybeComment :: T name string -> Maybe String | | isSpecial :: T name string -> Bool | | maybeSpecial :: T name string -> Maybe (Name name, String) | | isCData :: (Eq name, Tag name) => T name string -> Bool | | maybeCData :: (Eq name, Tag name) => T name string -> Maybe String | | isProcessing :: T name string -> Bool | | maybeProcessing :: T name string -> Maybe (Name name, T name string) | | isWarning :: T name string -> Bool | | maybeWarning :: T name string -> Maybe String | | formatOpen :: (Tag name, Attribute name, C string) => Bool -> Name name -> [T name string] -> ShowS | | formatClose :: Tag name => Name name -> ShowS | | textFromCData :: (Eq name, Tag name) => T name String -> T name String | | concatTexts :: Monoid string => [T name string] -> [T name string] | | mapText :: (Eq name, Tag name) => (String -> String) -> T name String -> T name String | | mapTextA :: (Eq name, Tag name, Applicative f) => (String -> f String) -> T name String -> f (T name String) |
|
|
Documentation |
|
|
An HTML element, a document is [T].
There is no requirement for Open and Close to match.
The type parameter string lets you choose between
[Char] for interpreted HTML entity references and
[HTMLChar.T] for uninterpreted HTML entities.
You will most oftenly want plain Char,
since HTMLChar.T is only necessary if you want to know,
whether a non-ASCII character was encoded as HTML entity
or as non-ASCII Unicode character.
| Constructors | Open (Name name) [T name string] | An open tag with Ts in their original order.
| Close (Name name) | A closing tag
| Text string | A text node, guaranteed not to be the empty string
| Comment String | A comment
| Special (Name name) String | A tag like <!DOCTYPE ...>
| Processing (Name name) (T name string) | A tag like <?xml ...>
| Warning String | Mark a syntax error in the input file
|
| Instances | |
|
|
|
Constructors | | Instances | |
|
|
mapName :: (name0 -> name1) -> T name0 string -> T name1 string | Source |
|
|
|
Test if a T is a Open
|
|
|
|
|
Test if a T is a Close
|
|
|
|
|
Test if a T is a Text
|
|
|
Extract the string from within Text, otherwise Nothing
|
|
|
Extract all text content from tags (similar to Verbatim found in HaXml)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Replace CDATA sections by plain text.
|
|
concatTexts :: Monoid string => [T name string] -> [T name string] | Source |
|
Merge adjacent Text sections.
|
|
|
Modify content of a Text or a CDATA part.
|
|
|
|
Produced by Haddock version 2.6.0 |