diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/format/json.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux index 4dfa6cb7d..261ff1330 100644 --- a/stdlib/source/lux/data/format/json.lux +++ b/stdlib/source/lux/data/format/json.lux @@ -54,7 +54,7 @@ (syntax: #export (json token) {#.doc (doc "A simple way to produce JSON literals." - (json true) + (json #1) (json 123.456) (json "Some text") (json #null) @@ -154,7 +154,7 @@ (def: (= x y) (case [x y] [#Null #Null] - true + #1 (^template [<tag> <struct>] [(<tag> x') (<tag> y')] @@ -167,12 +167,12 @@ (and (n/= (row.size xs) (row.size ys)) (list/fold (function (_ idx prev) (and prev - (maybe.default false + (maybe.default #0 (do maybe.Monad<Maybe> [x' (row.nth idx xs) y' (row.nth idx ys)] (wrap (= x' y')))))) - true + #1 (list.indices (row.size xs)))) [(#Object xs) (#Object ys)] @@ -180,13 +180,13 @@ (list/fold (function (_ [xk xv] prev) (and prev (case (dict.get xk ys) - #.None false + #.None #0 (#.Some yv) (= xv yv)))) - true + #1 (dict.entries xs))) _ - false))) + #0))) ############################################################ ############################################################ @@ -420,13 +420,13 @@ [_ (l.this <token>)] (wrap <value>)))] - [t~ "true" true] - [f~ "false" false] + [true~ "true" #1] + [false~ "false" #0] ) (def: boolean~ (l.Lexer Boolean) - (p.either t~ f~)) + (p.either true~ false~)) (def: number~ (l.Lexer Number) |