Skip to content

Commit 2b5316f

Browse files
Rearrange node constructors in order of how frequent we expect them to be.
1 parent d521c49 commit 2b5316f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Text/XmlHtml/Common.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ data Document = XmlDocument {
3636
-- element. XML processing instructions are intentionally omitted as a
3737
-- simplification, and CDATA and plain text are both text nodes, since they
3838
-- ought to be semantically interchangeable.
39-
data Node = TextNode !Text
40-
| Comment !Text
41-
| Element {
39+
data Node = Element {
4240
elementTag :: !Text,
4341
elementAttrs :: ![(Text, Text)],
4442
elementChildren :: ![Node]
4543
}
44+
| TextNode !Text
45+
| Comment !Text
4646
deriving (Eq, Show)
4747

4848

0 commit comments

Comments
 (0)