diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/macro/poly/json.lux | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/lux/macro/poly/json.lux b/stdlib/source/lux/macro/poly/json.lux index 02352109a..d001d4839 100644 --- a/stdlib/source/lux/macro/poly/json.lux +++ b/stdlib/source/lux/macro/poly/json.lux @@ -34,7 +34,7 @@ (def: tag (-> Nat Frac) - (|>. nat-to-int int-to-frac)) + (|>> nat-to-int int-to-frac)) (def: #hidden (rec-encode non-rec) (All [a] (-> (-> (-> a JSON) @@ -61,9 +61,9 @@ (|> low frac-to-int int-to-nat)))))) (struct: #hidden _ (Codec JSON Int) - (def: encode (|>. int-to-nat (:: Codec<JSON,Nat> encode))) + (def: encode (|>> int-to-nat (:: Codec<JSON,Nat> encode))) (def: decode - (|>. (:: Codec<JSON,Nat> decode) (:: e;Functor<Error> map nat-to-int)))) + (|>> (:: Codec<JSON,Nat> decode) (:: e;Functor<Error> map nat-to-int)))) (def: #hidden (nullable writer) {#;doc "Builds a JSON generator for potentially inexistent values."} @@ -76,9 +76,9 @@ (struct: #hidden (Codec<JSON,Qty> carrier) (All [unit] (-> unit (Codec JSON (unit;Qty unit)))) (def: encode - (|>. unit;out (:: Codec<JSON,Int> encode))) + (|>> unit;out (:: Codec<JSON,Int> encode))) (def: decode - (|>. (:: Codec<JSON,Int> decode) (:: e;Functor<Error> map (unit;in carrier))))) + (|>> (:: Codec<JSON,Int> decode) (:: e;Functor<Error> map (unit;in carrier))))) (poly: #hidden Codec<JSON,?>//encode (with-expansions @@ -89,16 +89,16 @@ <encoder>))))] [Unit poly;unit (function [(~ (code;symbol ["" "0"]))] #//;Null)] - [Bool poly;bool (|>. #//;Boolean)] + [Bool poly;bool (|>> #//;Boolean)] [Nat poly;nat (:: ;;Codec<JSON,Nat> (~' encode))] [Int poly;int (:: ;;Codec<JSON,Int> (~' encode))] - [Frac poly;frac (|>. #//;Number)] - [Text poly;text (|>. #//;String)]) + [Frac poly;frac (|>> #//;Number)] + [Text poly;text (|>> #//;String)]) <time> (do-template [<type> <codec>] [(do @ [_ (poly;this <type>)] (wrap (` (: (~ (@JSON//encode inputT)) - (|>. (:: <codec> (~' encode)) #//;String)))))] + (|>> (:: <codec> (~' encode)) #//;String)))))] [du;Duration du;Codec<Text,Duration>] [i;Instant i;Codec<Text,Instant>] @@ -127,7 +127,7 @@ poly;text Codec<JSON,?>//encode))] (wrap (` (: (~ (@JSON//encode inputT)) - (|>. d;entries + (|>> d;entries (;;_map_ (function [[(~ g!key) (~ g!val)]] [(~ g!key) ((~ .val.) (~ g!val))])) (d;from-list text;Hash<Text>) @@ -143,7 +143,7 @@ (poly;this ;List) Codec<JSON,?>//encode))] (wrap (` (: (~ (@JSON//encode inputT)) - (|>. (;;_map_ (~ .sub.)) sequence;from-list #//;Array))))) + (|>> (;;_map_ (~ .sub.)) sequence;from-list #//;Array))))) (do @ [#let [g!input (code;local-symbol "\u0000input")] members (poly;variant (p;many Codec<JSON,?>//encode))] @@ -159,7 +159,7 @@ [g!encoders (poly;tuple (p;many Codec<JSON,?>//encode)) #let [g!members (|> (list;size g!encoders) n/dec (list;n/range +0) - (list/map (|>. nat/encode code;local-symbol)))]] + (list/map (|>> nat/encode code;local-symbol)))]] (wrap (` (: (~ (@JSON//encode inputT)) (function [[(~@ g!members)]] (//;json [(~@ (list/map (function [[g!member g!encode]] @@ -276,7 +276,7 @@ (do @ [[funcC varsC bodyC] (poly;polymorphic Codec<JSON,?>//decode)] (wrap (` (: (All [(~@ varsC)] - (-> (~@ (list/map (|>. (~) //;Reader (`)) varsC)) + (-> (~@ (list/map (|>> (~) //;Reader (`)) varsC)) (//;Reader ((~ (poly;to-ast *env* inputT)) (~@ varsC))))) (function (~ funcC) [(~@ varsC)] (~ bodyC)))))) |