diff options
Diffstat (limited to 'stdlib/source/lux/data/format/json.lux')
-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 91bd9c2fd..f6bbe08b3 100644 --- a/stdlib/source/lux/data/format/json.lux +++ b/stdlib/source/lux/data/format/json.lux @@ -20,7 +20,7 @@ (coll [list "" Fold<List> "List/" Monad<List>] [vector #+ Vector vector "Vector/" Monad<Vector>] [dict #+ Dict])) - [compiler #+ Monad<Lux> with-gensyms] + [macro #+ Monad<Lux> with-gensyms] (macro [syntax #+ syntax:] [ast] [poly #+ poly:]) @@ -97,7 +97,7 @@ (wrap (` [(~ (ast;text key-name)) (~ (wrapper value))])) _ - (compiler;fail "Wrong syntax for JSON object."))) + (macro;fail "Wrong syntax for JSON object."))) pairs)] (wrap (list (` (: JSON (#Object (dict;from-list text;Hash<Text> (list (~@ pairs'))))))))) @@ -782,7 +782,7 @@ [Real poly;real ;;gen-number] [Char poly;char (|>. char;as-text ;;gen-string)] [Text poly;text ;;gen-string])] - ($_ compiler;either + ($_ macro;either <basic> (with-gensyms [g!type-fun g!case g!input g!key g!val] (do @ @@ -794,7 +794,7 @@ (wrap :val:)) _ - (compiler;fail "")) + (macro;fail "")) #let [new-*env* (poly;extend-env [:x: g!type-fun] (list;zip2 (|> g!vars list;size poly;type-var-indices) g!vars) @@ -891,7 +891,7 @@ pattern-matching (mapM @ (function [:member:] (do @ - [g!member (compiler;gensym "g!member") + [g!member (macro;gensym "g!member") encoder (Codec<JSON,?>//encode new-*env* :member:)] (wrap [g!member encoder]))) members) @@ -918,7 +918,7 @@ (wrap (` (: (~ (->Codec//encode (type;to-ast :x:))) ((~ .func.) (~@ .args.)))))) (poly;bound *env* :x:) - (compiler;fail (format "Can't create JSON encoder for: " (%type :x:))) + (macro;fail (format "Can't create JSON encoder for: " (%type :x:))) )))) (poly: #hidden (Codec<JSON,?>//decode *env* :x:) @@ -942,7 +942,7 @@ [Maybe poly;maybe ;;nullable] [List poly;list ;;array])] - ($_ compiler;either + ($_ macro;either <basic> (with-gensyms [g!type-fun g!case g!input g!key g!val] (do @ @@ -954,7 +954,7 @@ (wrap :val:)) _ - (compiler;fail "")) + (macro;fail "")) #let [new-*env* (poly;extend-env [:x: g!type-fun] (list;zip2 (|> g!vars list;size poly;type-var-indices) g!vars) *env*)] @@ -1056,7 +1056,7 @@ pattern-matching (mapM @ (function [:member:] (do @ - [g!member (compiler;gensym "g!member") + [g!member (macro;gensym "g!member") decoder (Codec<JSON,?>//decode new-*env* :member:)] (wrap [g!member decoder]))) members) @@ -1086,7 +1086,7 @@ (do @ [g!bound (poly;bound *env* :x:)] (wrap g!bound)) - (compiler;fail (format "Can't create JSON decoder for: " (%type :x:))) + (macro;fail (format "Can't create JSON decoder for: " (%type :x:))) )))) (syntax: #export (Codec<JSON,?> :x:) |