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.lux34
1 files changed, 17 insertions, 17 deletions
diff --git a/stdlib/source/lux/data/format/xml.lux b/stdlib/source/lux/data/format/xml.lux
index 06b4b3994..23b12a42d 100644
--- a/stdlib/source/lux/data/format/xml.lux
+++ b/stdlib/source/lux/data/format/xml.lux
@@ -245,14 +245,14 @@
(type: #export (Reader a)
(p.Parser (List XML) a))
-(exception: #export Empty-Input)
-(exception: #export Unexpected-Input)
-(exception: #export Unknown-Attribute)
+(exception: #export empty-input)
+(exception: #export unexpected-input)
+(exception: #export unknown-attribute)
-(exception: #export (Wrong-Tag {tag Ident})
+(exception: #export (wrong-tag {tag Ident})
(ident/encode tag))
-(exception: #export (Unconsumed-Inputs {inputs (List XML)})
+(exception: #export (unconsumed-inputs {inputs (List XML)})
(|> inputs
(list/map (:: Codec<Text,XML> encode))
(text.join-with "\n\n")))
@@ -262,7 +262,7 @@
(function (_ docs)
(case docs
#.Nil
- (ex.throw Empty-Input [])
+ (ex.throw empty-input [])
(#.Cons head tail)
(case head
@@ -270,24 +270,24 @@
(#E.Success [tail value])
(#Node _)
- (ex.throw Unexpected-Input [])))))
+ (ex.throw unexpected-input [])))))
(def: #export (attr name)
(-> Ident (Reader Text))
(function (_ docs)
(case docs
#.Nil
- (ex.throw Empty-Input [])
+ (ex.throw empty-input [])
(#.Cons head _)
(case head
(#Text _)
- (ex.throw Unexpected-Input [])
+ (ex.throw unexpected-input [])
(#Node tag attrs children)
(case (d.get name attrs)
#.None
- (ex.throw Unknown-Attribute [])
+ (ex.throw unknown-attribute [])
(#.Some value)
(#E.Success [docs value]))))))
@@ -298,7 +298,7 @@
(#E.Success [remaining output])
(if (list.empty? remaining)
(#E.Success output)
- (ex.throw Unconsumed-Inputs remaining))
+ (ex.throw unconsumed-inputs remaining))
(#E.Error error)
(#E.Error error)))
@@ -308,29 +308,29 @@
(function (_ docs)
(case docs
#.Nil
- (ex.throw Empty-Input [])
+ (ex.throw empty-input [])
(#.Cons head _)
(case head
(#Text _)
- (ex.throw Unexpected-Input [])
+ (ex.throw unexpected-input [])
(#Node _tag _attrs _children)
(if (ident/= tag _tag)
(#E.Success [docs []])
- (ex.throw Wrong-Tag tag))))))
+ (ex.throw wrong-tag tag))))))
(def: #export (children reader)
(All [a] (-> (Reader a) (Reader a)))
(function (_ docs)
(case docs
#.Nil
- (ex.throw Empty-Input [])
+ (ex.throw empty-input [])
(#.Cons head tail)
(case head
(#Text _)
- (ex.throw Unexpected-Input [])
+ (ex.throw unexpected-input [])
(#Node _tag _attrs _children)
(do E.Monad<Error>
@@ -342,7 +342,7 @@
(function (_ docs)
(case docs
#.Nil
- (ex.throw Empty-Input [])
+ (ex.throw empty-input [])
(#.Cons head tail)
(#E.Success [tail []]))))