aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/format/json.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/data/format/json.lux')
-rw-r--r--stdlib/source/lux/data/format/json.lux22
1 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux
index 9262c3d70..a5c81ad6b 100644
--- a/stdlib/source/lux/data/format/json.lux
+++ b/stdlib/source/lux/data/format/json.lux
@@ -15,7 +15,7 @@
[sum]
[product]
(coll [list "list/" Fold<List> Monad<List>]
- [sequence #+ Sequence sequence "sequence/" Monad<Sequence>]
+ [row #+ Row row "row/" Monad<Row>]
(dictionary ["dict" unordered #+ Dict])))
[macro #+ Monad<Meta> with-gensyms]
(macro ["s" syntax #+ syntax:]
@@ -35,13 +35,13 @@
(#Boolean Boolean)
(#Number Number)
(#String String)
- (#Array (Sequence JSON))
+ (#Array (Row JSON))
(#Object (Dict String JSON)))
(do-template [<name> <type>]
[(type: #export <name> <type>)]
- [Array (Sequence JSON)]
+ [Array (Row JSON)]
[Object (Dict String JSON)]
)
@@ -72,7 +72,7 @@
(wrap (list (` (: JSON #Null))))
[_ (#.Tuple members)]
- (wrap (list (` (: JSON (#Array (sequence (~+ (list/map wrapper members))))))))
+ (wrap (list (` (: JSON (#Array (row (~+ (list/map wrapper members))))))))
[_ (#.Record pairs)]
(do Monad<Meta>
@@ -161,16 +161,16 @@
[#String text.Eq<Text>])
[(#Array xs) (#Array ys)]
- (and (n/= (sequence.size xs) (sequence.size ys))
+ (and (n/= (row.size xs) (row.size ys))
(list/fold (function (_ idx prev)
(and prev
(maybe.default false
(do maybe.Monad<Maybe>
- [x' (sequence.nth idx xs)
- y' (sequence.nth idx ys)]
+ [x' (row.nth idx xs)
+ y' (row.nth idx ys)]
(wrap (= x' y'))))))
true
- (list.indices (sequence.size xs))))
+ (list.indices (row.size xs))))
[(#Object xs) (#Object ys)]
(and (n/= (dict.size xs) (dict.size ys))
@@ -285,7 +285,7 @@
[head any]
(case head
(#Array values)
- (case (p.run (sequence.to-list values) parser)
+ (case (p.run (row.to-list values) parser)
(#e.Error error)
(fail error)
@@ -364,7 +364,7 @@
(def: (show-array show-json elems)
(-> (-> JSON Text) (-> Array Text))
($_ text/compose "["
- (|> elems (sequence/map show-json) sequence.to-list (text.join-with ","))
+ (|> elems (row/map show-json) row.to-list (text.join-with ","))
"]"))
(def: (show-object show-json object)
@@ -487,7 +487,7 @@
_ (l.this <close>)]
(wrap (<prep> elems))))]
- [array~ Array "[" "]" (json~ []) sequence.from-list]
+ [array~ Array "[" "]" (json~ []) row.from-list]
[object~ Object "{" "}" (kv~ json~) (dict.from-list text.Hash<Text>)]
)