aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/format/xml.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data/format/xml.lux')
-rw-r--r--stdlib/source/library/lux/data/format/xml.lux23
1 files changed, 12 insertions, 11 deletions
diff --git a/stdlib/source/library/lux/data/format/xml.lux b/stdlib/source/library/lux/data/format/xml.lux
index df6642565..1db81f6d7 100644
--- a/stdlib/source/library/lux/data/format/xml.lux
+++ b/stdlib/source/library/lux/data/format/xml.lux
@@ -11,7 +11,6 @@
["<[0]>" text {"+" Parser}]]]
[data
["[0]" product]
- ["[0]" name ("[1]#[0]" equivalence codec)]
["[0]" text {"+" \n} ("[1]#[0]" equivalence monoid)]
[collection
["[0]" list ("[1]#[0]" functor)]
@@ -19,20 +18,22 @@
[math
[number
["n" nat]
- ["[0]" int]]]]])
+ ["[0]" int]]]
+ [meta
+ ["[0]" symbol ("[1]#[0]" equivalence codec)]]]])
(type: .public Tag
- Name)
+ Symbol)
(type: .public Attribute
- Name)
+ Symbol)
(type: .public Attrs
(Dictionary Attribute Text))
(def: .public attributes
Attrs
- (dictionary.empty name.hash))
+ (dictionary.empty symbol.hash))
(type: .public XML
(Rec XML
@@ -87,7 +88,7 @@
(in ($_ text#composite head tail))))
(def: namespaced_symbol^
- (Parser Name)
+ (Parser Symbol)
(do <>.monad
[first_part xml_identifier
?second_part (<| <>.maybe (<>.after (<text>.this ..namespace_separator)) xml_identifier)]
@@ -115,7 +116,7 @@
(def: attrs^
(Parser Attrs)
- (<| (# <>.monad each (dictionary.of_list name.hash))
+ (<| (# <>.monad each (dictionary.of_list symbol.hash))
<>.some
(<>.and (..spaced^ attr_name^))
(<>.after (<text>.this "="))
@@ -129,9 +130,9 @@
(<>.after (<text>.this "/"))
(<text>.enclosed ["<" ">"]))]
(<>.assertion ($_ text#composite "Close tag does not match open tag." \n
- "Expected: " (name#encoded expected) \n
- " Actual: " (name#encoded actual) \n)
- (name#= expected actual))))
+ "Expected: " (symbol#encoded expected) \n
+ " Actual: " (symbol#encoded actual) \n)
+ (symbol#= expected actual))))
(def: comment^
(Parser Text)
@@ -284,7 +285,7 @@
[{#Node reference/tag reference/attrs reference/children}
{#Node sample/tag sample/attrs sample/children}]
- (and (name#= reference/tag sample/tag)
+ (and (symbol#= reference/tag sample/tag)
(# (dictionary.equivalence text.equivalence) = reference/attrs sample/attrs)
(n.= (list.size reference/children)
(list.size sample/children))