aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/format/json.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/data/format/json.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux
index 56400e0ca..5bd36a123 100644
--- a/stdlib/source/library/lux/data/format/json.lux
+++ b/stdlib/source/library/lux/data/format/json.lux
@@ -20,7 +20,7 @@
["[0]" text ("[1]#[0]" equivalence monoid)]
[collection
["[0]" list ("[1]#[0]" mix functor)]
- ["[0]" row {"+" Row row} ("[1]#[0]" monad)]
+ ["[0]" sequence {"+" Sequence sequence} ("[1]#[0]" monad)]
["[0]" dictionary {"+" Dictionary}]]]
[macro
[syntax {"+" syntax:}]
@@ -47,14 +47,14 @@
{#Boolean Boolean}
{#Number Number}
{#String String}
- {#Array (Row JSON)}
+ {#Array (Sequence JSON)}
{#Object (Dictionary String JSON)})))
(template [<name> <type>]
[(type: .public <name>
<type>)]
- [Array (Row JSON)]
+ [Array (Sequence JSON)]
[Object (Dictionary String JSON)]
)
@@ -74,7 +74,7 @@
{#Boolean' Boolean}
{#Number' Number}
{#String' String}
- {#Array' (Row JSON')}
+ {#Array' (Sequence JSON')}
{#Object' (Dictionary String JSON')}
{#Code' Code})))
@@ -87,7 +87,7 @@
<code>.bit
<code>.frac
<code>.text
- (<>#each row.of_list
+ (<>#each sequence.of_list
(<code>.tuple (<>.some jsonP)))
(<>#each (dictionary.of_list text.hash)
(<code>.variant (<>.some (<>.and <code>.text jsonP))))
@@ -108,7 +108,7 @@
[code.text ..#String' ..#String])
{#Array' members}
- (` {..#Array ((~! row.row) (~+ (row.list (row#each jsonF members))))})
+ (` {..#Array ((~! sequence.sequence) (~+ (sequence.list (sequence#each jsonF members))))})
{#Object' pairs}
(` {..#Object ((~! dictionary.of_list)
@@ -192,16 +192,16 @@
[#String text.equivalence])
[{#Array xs} {#Array ys}]
- (and (n.= (row.size xs) (row.size ys))
+ (and (n.= (sequence.size xs) (sequence.size ys))
(list#mix (function (_ idx prev)
(and prev
(maybe.else #0
(do maybe.monad
- [x' (row.item idx xs)
- y' (row.item idx ys)]
+ [x' (sequence.item idx xs)
+ y' (sequence.item idx ys)]
(in (= x' y'))))))
#1
- (list.indices (row.size xs))))
+ (list.indices (sequence.size xs))))
[{#Object xs} {#Object ys}]
(and (n.= (dictionary.size xs) (dictionary.size ys))
@@ -264,8 +264,8 @@
(def: (array_format format)
(-> (-> JSON Text) (-> Array Text))
- (|>> (row#each format)
- row.list
+ (|>> (sequence#each format)
+ sequence.list
(text.interposed ..value_separator)
(text.enclosed [..array_start ..array_end])))
@@ -411,7 +411,7 @@
_ (<text>.this <close>)]
(in (<prep> elems))))]
- [array_parser Array ..array_start ..array_end json_parser row.of_list]
+ [array_parser Array ..array_start ..array_end json_parser sequence.of_list]
[object_parser Object ..object_start ..object_end (kv_parser json_parser) (dictionary.of_list text.hash)]
)