aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/format/xml.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/data/format/xml.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/lux/data/format/xml.lux b/stdlib/source/lux/data/format/xml.lux
index 0ed744b46..e1cbda0db 100644
--- a/stdlib/source/lux/data/format/xml.lux
+++ b/stdlib/source/lux/data/format/xml.lux
@@ -8,7 +8,7 @@
["ex" exception (#+ exception:)]]
[data
["." number]
- ["E" error]
+ ["." error (#+ Error)]
["." product]
["." name ("name/." Equivalence<Name> Codec<Text,Name>)]
["." text ("text/." Equivalence<Text> Monoid<Text>)
@@ -171,7 +171,7 @@
(p.after (p.maybe xml-header^))))
(def: #export (read input)
- (-> Text (E.Error XML))
+ (-> Text (Error XML))
(l.run input xml^))
(def: (sanitize-value input)
@@ -271,7 +271,7 @@
(#.Cons head tail)
(case head
(#Text value)
- (#E.Success [tail value])
+ (#error.Success [tail value])
(#Node _)
(ex.throw unexpected-input [])))))
@@ -294,18 +294,18 @@
(ex.throw unknown-attribute [])
(#.Some value)
- (#E.Success [docs value]))))))
+ (#error.Success [docs value]))))))
(def: (run' docs reader)
- (All [a] (-> (List XML) (Reader a) (E.Error a)))
+ (All [a] (-> (List XML) (Reader a) (Error a)))
(case (p.run docs reader)
- (#E.Success [remaining output])
+ (#error.Success [remaining output])
(if (list.empty? remaining)
- (#E.Success output)
+ (#error.Success output)
(ex.throw unconsumed-inputs remaining))
- (#E.Error error)
- (#E.Error error)))
+ (#error.Failure error)
+ (#error.Failure error)))
(def: #export (node tag)
(-> Name (Reader Any))
@@ -321,7 +321,7 @@
(#Node _tag _attrs _children)
(if (name/= tag _tag)
- (#E.Success [docs []])
+ (#error.Success [docs []])
(ex.throw wrong-tag tag))))))
(def: #export (children reader)
@@ -337,7 +337,7 @@
(ex.throw unexpected-input [])
(#Node _tag _attrs _children)
- (do E.Monad<Error>
+ (do error.Monad<Error>
[output (run' _children reader)]
(wrap [tail output]))))))
@@ -349,8 +349,8 @@
(ex.throw empty-input [])
(#.Cons head tail)
- (#E.Success [tail []]))))
+ (#error.Success [tail []]))))
(def: #export (run document reader)
- (All [a] (-> XML (Reader a) (E.Error a)))
+ (All [a] (-> XML (Reader a) (Error a)))
(run' (list document) reader))