diff options
author | Eduardo Julian | 2021-07-25 03:12:17 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-25 03:12:17 -0400 |
commit | 62b3abfcc014ca1c19d62aacdd497f6a250b372c (patch) | |
tree | c23155ecef6018b78b349f0ba6cd238872b24da7 /stdlib/source/poly/lux/data/format/json.lux | |
parent | 0f545b7e57d2564e351d907befd2ce26900c5521 (diff) |
Better syntax for "library/lux.^multi".
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/poly/lux/data/format/json.lux | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/stdlib/source/poly/lux/data/format/json.lux b/stdlib/source/poly/lux/data/format/json.lux index d7409df9f..5c63c58e1 100644 --- a/stdlib/source/poly/lux/data/format/json.lux +++ b/stdlib/source/poly/lux/data/format/json.lux @@ -135,36 +135,36 @@ <basic> <time> (do ! - [unitT (<type>.apply (<>.after (<type>.exactly unit.Qty) - <type>.any))] + [unitT (<type>.applied (<>.after (<type>.exactly unit.Qty) + <type>.any))] (wrap (` (: (~ (@JSON\encode inputT)) (\ (~! qty_codec) (~' encode)))))) (do ! [#let [g!_ (code.local_identifier "_______") g!key (code.local_identifier "_______key") g!val (code.local_identifier "_______val")] - [_ _ =val=] (<type>.apply ($_ <>.and - (<type>.exactly d.Dictionary) - (<type>.exactly .Text) - encode))] + [_ _ =val=] (<type>.applied ($_ <>.and + (<type>.exactly d.Dictionary) + (<type>.exactly .Text) + encode))] (wrap (` (: (~ (@JSON\encode inputT)) (|>> ((~! d.entries)) ((~! list\map) (function ((~ g!_) [(~ g!key) (~ g!val)]) [(~ g!key) ((~ =val=) (~ g!val))])) - ((~! d.from_list) (~! text.hash)) + ((~! d.of_list) (~! text.hash)) #/.Object))))) (do ! - [[_ =sub=] (<type>.apply ($_ <>.and - (<type>.exactly .Maybe) - encode))] + [[_ =sub=] (<type>.applied ($_ <>.and + (<type>.exactly .Maybe) + encode))] (wrap (` (: (~ (@JSON\encode inputT)) ((~! ..nullable) (~ =sub=)))))) (do ! - [[_ =sub=] (<type>.apply ($_ <>.and - (<type>.exactly .List) - encode))] + [[_ =sub=] (<type>.applied ($_ <>.and + (<type>.exactly .List) + encode))] (wrap (` (: (~ (@JSON\encode inputT)) - (|>> ((~! list\map) (~ =sub=)) ((~! row.from_list)) #/.Array))))) + (|>> ((~! list\map) (~ =sub=)) ((~! row.of_list)) #/.Array))))) (do ! [#let [g!_ (code.local_identifier "_______") g!input (code.local_identifier "_______input")] @@ -205,7 +205,7 @@ <type>.recursive_self ## Type applications (do ! - [partsC (<type>.apply (<>.many encode))] + [partsC (<type>.applied (<>.many encode))] (wrap (` ((~+ partsC))))) ## Polymorphism (do ! @@ -258,25 +258,25 @@ <basic> <time> (do ! - [unitT (<type>.apply (<>.after (<type>.exactly unit.Qty) - <type>.any))] + [unitT (<type>.applied (<>.after (<type>.exactly unit.Qty) + <type>.any))] (wrap (` (: (~ (@JSON\decode inputT)) ((~! <>.codec) (~! qty_codec) (~! </>.any)))))) (do ! - [[_ _ valC] (<type>.apply ($_ <>.and - (<type>.exactly d.Dictionary) - (<type>.exactly .Text) - decode))] + [[_ _ valC] (<type>.applied ($_ <>.and + (<type>.exactly d.Dictionary) + (<type>.exactly .Text) + decode))] (wrap (` (: (~ (@JSON\decode inputT)) ((~! </>.dictionary) (~ valC)))))) (do ! - [[_ subC] (<type>.apply (<>.and (<type>.exactly .Maybe) - decode))] + [[_ subC] (<type>.applied (<>.and (<type>.exactly .Maybe) + decode))] (wrap (` (: (~ (@JSON\decode inputT)) ((~! </>.nullable) (~ subC)))))) (do ! - [[_ subC] (<type>.apply (<>.and (<type>.exactly .List) - decode))] + [[_ subC] (<type>.applied (<>.and (<type>.exactly .List) + decode))] (wrap (` (: (~ (@JSON\decode inputT)) ((~! </>.array) ((~! <>.some) (~ subC))))))) (do ! @@ -309,7 +309,7 @@ <type>.recursive_self ## Type applications (do ! - [[funcC argsC] (<type>.apply (<>.and decode (<>.many decode)))] + [[funcC argsC] (<type>.applied (<>.and decode (<>.many decode)))] (wrap (` ((~ funcC) (~+ argsC))))) ## Polymorphism (do ! |