diff options
Diffstat (limited to 'stdlib/source/lux/macro/poly/json.lux')
-rw-r--r-- | stdlib/source/lux/macro/poly/json.lux | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/stdlib/source/lux/macro/poly/json.lux b/stdlib/source/lux/macro/poly/json.lux index 1e61d49f9..1c3510b85 100644 --- a/stdlib/source/lux/macro/poly/json.lux +++ b/stdlib/source/lux/macro/poly/json.lux @@ -13,8 +13,8 @@ ["R" result] [sum] [product] - (coll [list "L/" Fold<List> Monad<List>] - [vector #+ Vector vector "Vector/" Monad<Vector>] + (coll [list "list/" Fold<List> Monad<List>] + [vector #+ Vector vector "vector/" Monad<Vector>] ["d" dict]) (format [".." json #+ JSON])) (time ["i" instant] @@ -30,7 +30,7 @@ (def: #hidden _map_ (All [a b] (-> (-> a b) (List a) (List b))) - L/map) + list/map) (def: tag (-> Nat Frac) @@ -150,21 +150,21 @@ (wrap (` (: (~ (@JSON//encode inputT)) (function [(~ g!input)] (case (~ g!input) - (~@ (L/join (L/map (function [[tag g!encode]] - (list (` ((~ (code;nat tag)) (~ g!input))) - (` (..;json [(~ (code;frac (;;tag tag))) - ((~ g!encode) (~ g!input))])))) - (list;enumerate members)))))))))) + (~@ (list/join (list/map (function [[tag g!encode]] + (list (` ((~ (code;nat tag)) (~ g!input))) + (` (..;json [(~ (code;frac (;;tag tag))) + ((~ g!encode) (~ g!input))])))) + (list;enumerate members)))))))))) (do @ [g!encoders (poly;tuple (p;many Codec<JSON,?>//encode)) #let [g!members (|> (list;size g!encoders) n.dec (list;n.range +0) - (L/map (|>. nat/encode code;local-symbol)))]] + (list/map (|>. nat/encode code;local-symbol)))]] (wrap (` (: (~ (@JSON//encode inputT)) (function [[(~@ g!members)]] - (..;json [(~@ (L/map (function [[g!member g!encode]] - (` ((~ g!encode) (~ g!member)))) - (list;zip2 g!members g!encoders)))])))))) + (..;json [(~@ (list/map (function [[g!member g!encode]] + (` ((~ g!encode) (~ g!member)))) + (list;zip2 g!members g!encoders)))])))))) ## Type recursion (do @ [[selfC non-recC] (poly;recursive Codec<JSON,?>//encode)] @@ -180,8 +180,8 @@ (do @ [[funcC varsC bodyC] (poly;polymorphic Codec<JSON,?>//encode)] (wrap (` (: (All [(~@ varsC)] - (-> (~@ (L/map (function [varC] (` (-> (~ varC) ..;JSON))) - varsC)) + (-> (~@ (list/map (function [varC] (` (-> (~ varC) ..;JSON))) + varsC)) (-> ((~ (poly;to-ast *env* inputT)) (~@ varsC)) ..;JSON))) (function (~ funcC) [(~@ varsC)] @@ -252,11 +252,11 @@ [members (poly;variant (p;many Codec<JSON,?>//decode))] (wrap (` (: (~ (@JSON//decode inputT)) ($_ p;alt - (~@ (L/map (function [[tag memberC]] - (` (|> (~ memberC) - (p;after (..;number! (~ (code;frac (;;tag tag))))) - ..;array))) - (list;enumerate members)))))))) + (~@ (list/map (function [[tag memberC]] + (` (|> (~ memberC) + (p;after (..;number! (~ (code;frac (;;tag tag))))) + ..;array))) + (list;enumerate members)))))))) (do @ [g!decoders (poly;tuple (p;many Codec<JSON,?>//decode))] (wrap (` (: (~ (@JSON//decode inputT)) @@ -276,7 +276,7 @@ (do @ [[funcC varsC bodyC] (poly;polymorphic Codec<JSON,?>//decode)] (wrap (` (: (All [(~@ varsC)] - (-> (~@ (L/map (|>. (~) ..;Reader (`)) varsC)) + (-> (~@ (list/map (|>. (~) ..;Reader (`)) varsC)) (..;Reader ((~ (poly;to-ast *env* inputT)) (~@ varsC))))) (function (~ funcC) [(~@ varsC)] (~ bodyC)))))) |