git.iko.soy/typeable/html-parse
on master help sign in
A few haddock comments
bb9af9fBen Gamari
Text/HTML/Parser.hs+3−1
@@ -29,12 +29,13 @@ type TagName = Text
29type AttrName = Text
29type AttrName = Text
30type AttrValue = Text
30type AttrValue = Text
31
31
32+-- | An HTML token
32data Token
33data Token
33 -- | An opening tag. Attribute ordering is arbitrary
34 -- | An opening tag. Attribute ordering is arbitrary
34 = TagOpen !TagName [Attr]
35 = TagOpen !TagName [Attr]
35 -- | A closing tag.
36 -- | A closing tag.
36 | TagClose !TagName
37 | TagClose !TagName
37− -- | A text between tags.
38+ -- | The content between tags.
38 | ContentChar !Char
39 | ContentChar !Char
39 | ContentText !Text
40 | ContentText !Text
40 -- | Contents of a comment.
41 -- | Contents of a comment.
@@ -43,6 +44,7 @@ data Token
43 | Doctype !Text
44 | Doctype !Text
44 deriving (Show, Ord, Eq, Generic)
45 deriving (Show, Ord, Eq, Generic)
45
46
47+-- | An attribute of a tag
46data Attr = Attr !AttrName !AttrValue
48data Attr = Attr !AttrName !AttrValue
47 deriving (Show, Eq, Ord)
49 deriving (Show, Eq, Ord)
48
50