diff options
Diffstat (limited to 'stdlib/source/poly/lux/data/format/json.lux')
-rw-r--r-- | stdlib/source/poly/lux/data/format/json.lux | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/poly/lux/data/format/json.lux b/stdlib/source/poly/lux/data/format/json.lux index 847e3a160..5ee07e1d1 100644 --- a/stdlib/source/poly/lux/data/format/json.lux +++ b/stdlib/source/poly/lux/data/format/json.lux @@ -29,8 +29,8 @@ ["." int] ["." frac]]] [time - ## ["." instant] - ## ["." duration] + ... ["." instant] + ... ["." duration] ["." date] ["." day] ["." month]] @@ -116,8 +116,8 @@ (in (` (: (~ (@JSON\encode inputT)) (|>> (\ (~! <codec>) (~' encode)) #/.String)))))] - ## [duration.Duration duration.codec] - ## [instant.Instant instant.codec] + ... [duration.Duration duration.codec] + ... [instant.Instant instant.codec] [date.Date date.codec] [day.Day day.codec] [month.Month month.codec])] @@ -191,7 +191,7 @@ ((~! /.json) [(~+ (list\map (function (_ [g!member g!encode]) (` ((~ g!encode) (~ g!member)))) (list.zipped/2 g!members g!encoders)))])))))) - ## Type recursion + ... Type recursion (do ! [[selfC non_recC] (<type>.recursive encode) .let [g! (code.local_identifier "____________")]] @@ -199,11 +199,11 @@ ((~! ..rec_encode) (.function ((~ g!) (~ selfC)) (~ non_recC))))))) <type>.recursive_self - ## Type applications + ... Type applications (do ! [partsC (<type>.applied (<>.many encode))] (in (` ((~+ partsC))))) - ## Polymorphism + ... Polymorphism (do ! [[funcC varsC bodyC] (<type>.polymorphic encode)] (in (` (: (All [(~+ varsC)] @@ -215,7 +215,7 @@ (~ bodyC)))))) <type>.parameter <type>.recursive_call - ## If all else fails... + ... If all else fails... (<>.failure (format "Cannot create JSON encoder for: " (type.format inputT))) )))) @@ -239,8 +239,8 @@ (in (` (: (~ (@JSON\decode inputT)) ((~! <>.codec) (~! <codec>) (~! </>.string))))))] - ## [duration.Duration duration.codec] - ## [instant.Instant instant.codec] + ... [duration.Duration duration.codec] + ... [instant.Instant instant.codec] [date.Date date.codec] [day.Day day.codec] [month.Month month.codec])] @@ -295,7 +295,7 @@ [g!decoders (<type>.tuple (<>.many decode))] (in (` (: (~ (@JSON\decode inputT)) ((~! </>.array) ($_ ((~! <>.and)) (~+ g!decoders))))))) - ## Type recursion + ... Type recursion (do ! [[selfC bodyC] (<type>.recursive decode) .let [g! (code.local_identifier "____________")]] @@ -303,11 +303,11 @@ ((~! <>.rec) (.function ((~ g!) (~ selfC)) (~ bodyC))))))) <type>.recursive_self - ## Type applications + ... Type applications (do ! [[funcC argsC] (<type>.applied (<>.and decode (<>.many decode)))] (in (` ((~ funcC) (~+ argsC))))) - ## Polymorphism + ... Polymorphism (do ! [[funcC varsC bodyC] (<type>.polymorphic decode)] (in (` (: (All [(~+ varsC)] @@ -317,7 +317,7 @@ (~ bodyC)))))) <type>.parameter <type>.recursive_call - ## If all else fails... + ... If all else fails... (<>.failure (format "Cannot create JSON decoder for: " (type.format inputT))) )))) |