From dda05bca0956af5e5b3875c4cc36e61aa04772e4 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 12 Sep 2021 00:07:08 -0400 Subject: Made the "#" character great again! --- stdlib/source/poly/lux/data/format/json.lux | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'stdlib/source/poly') diff --git a/stdlib/source/poly/lux/data/format/json.lux b/stdlib/source/poly/lux/data/format/json.lux index 80d8e37e7..53bdcd06c 100644 --- a/stdlib/source/poly/lux/data/format/json.lux +++ b/stdlib/source/poly/lux/data/format/json.lux @@ -59,8 +59,8 @@ (def: (encoded input) (let [high (|> input (i64.and high_mask) (i64.right_shifted 32)) low (i64.and low_mask input)] - {#/.Array (row (|> high .int int.frac #/.Number) - (|> low .int int.frac #/.Number))})) + {/.#Array (row (|> high .int int.frac {/.#Number}) + (|> low .int int.frac {/.#Number}))})) (def: decoded (.result (.array (do <>.monad @@ -82,19 +82,19 @@ (All (_ a) (-> (-> a JSON) (-> (Maybe a) JSON))) (function (_ elem) (case elem - #.None #/.Null - {#.Some value} (writer value)))) + {.#None} {/.#Null} + {.#Some value} (writer value)))) (implementation: qty_codec (All (_ unit) (codec.Codec JSON (unit.Qty unit))) (def: encoded - (|>> ((debug.private unit.out)) + (|>> ((debug.private unit.out')) (\ ..int_codec encoded))) (def: decoded (|>> (\ ..int_codec decoded) - (\ try.functor each (debug.private unit.in))))) + (\ try.functor each (debug.private unit.in'))))) (poly: encoded (with_expansions @@ -105,17 +105,17 @@ (in (` (: (~ (@JSON\encoded inputT)) ))))] - [(.exactly Any) (function ((~ g!_) (~ (code.identifier ["" "0"]))) #/.Null)] - [(.sub Bit) (|>> {#/.Boolean})] + [(.exactly Any) (function ((~ g!_) (~ (code.identifier ["" "0"]))) {/.#Null})] + [(.sub Bit) (|>> {/.#Boolean})] [(.sub Nat) (\ (~! ..nat_codec) (~' encoded))] [(.sub Int) (\ (~! ..int_codec) (~' encoded))] - [(.sub Frac) (|>> {#/.Number})] - [(.sub Text) (|>> {#/.String})]) + [(.sub Frac) (|>> {/.#Number})] + [(.sub Text) (|>> {/.#String})])