Skip to content

Commit 0358453

Browse files
authored
Merge pull request #23 from srghma/patch-1
add Show instance to the NodeType
2 parents e611cf4 + 8b664fb commit 0358453

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Web/DOM/NodeType.purs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ instance boundedEnumNodeType :: BoundedEnum NodeType where
3535
cardinality = Cardinality 12
3636
toEnum = toEnumNodeType
3737
fromEnum = fromEnumNodeType
38+
39+
instance showNodeType :: Show NodeType where
40+
show ElementNode = "ElementNode"
41+
show AttributeNode = "AttributeNode"
42+
show TextNode = "TextNode"
43+
show CDATASectionNode = "CDATASectionNode"
44+
show EntityReferenceNode = "EntityReferenceNode"
45+
show EntityNode = "EntityNode"
46+
show ProcessingInstructionNode = "ProcessingInstructionNode"
47+
show CommentNode = "CommentNode"
48+
show DocumentNode = "DocumentNode"
49+
show DocumentTypeNode = "DocumentTypeNode"
50+
show DocumentFragmentNode = "DocumentFragmentNode"
51+
show NotationNode = "NotationNode"
3852

3953
toEnumNodeType :: Int -> Maybe NodeType
4054
toEnumNodeType 1 = Just ElementNode

0 commit comments

Comments
 (0)