diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/polytypic/lux/abstract/equivalence.lux | 2 | ||||
-rw-r--r-- | stdlib/source/polytypic/lux/data/format/json.lux | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/polytypic/lux/abstract/equivalence.lux b/stdlib/source/polytypic/lux/abstract/equivalence.lux index 3d8497e87..4b50b9e2b 100644 --- a/stdlib/source/polytypic/lux/abstract/equivalence.lux +++ b/stdlib/source/polytypic/lux/abstract/equivalence.lux @@ -101,7 +101,7 @@ [month.Month month.equivalence] )) (do ! - [_ (<type>.applied (<>.and (<type>.exactly unit.Qty) + [_ (<type>.applied (<>.and (<type>.exactly unit.Measure) <type>.any))] (in (` (is (~ (@Equivalence inputT)) unit.equivalence)))) diff --git a/stdlib/source/polytypic/lux/data/format/json.lux b/stdlib/source/polytypic/lux/data/format/json.lux index 4d19b7a64..a177d5712 100644 --- a/stdlib/source/polytypic/lux/data/format/json.lux +++ b/stdlib/source/polytypic/lux/data/format/json.lux @@ -86,16 +86,16 @@ {.#None} {/.#Null} {.#Some value} (format value)))) -(def qty_codec +(def measure_codec (All (_ unit) - (codec.Codec JSON (unit.Qty unit))) + (codec.Codec JSON (unit.Measure unit))) (implementation (def encoded (|>> unit.number (at ..int_codec encoded))) (def decoded (|>> (at ..int_codec decoded) - (at try.functor each unit.quantity))))) + (at try.functor each unit.measure))))) (def encoded (polytypic encoded @@ -135,10 +135,10 @@ <basic> <time> (do ! - [unitT (<type>.applied (<>.after (<type>.exactly unit.Qty) + [unitT (<type>.applied (<>.after (<type>.exactly unit.Measure) <type>.any))] (in (` (is (~ (@JSON#encoded inputT)) - (at (~! qty_codec) (~' encoded)))))) + (at (~! measure_codec) (~' encoded)))))) (do ! [.let [g!_ (code.local "_______") g!key (code.local "_______key") @@ -260,10 +260,10 @@ <basic> <time> (do ! - [unitT (<type>.applied (<>.after (<type>.exactly unit.Qty) + [unitT (<type>.applied (<>.after (<type>.exactly unit.Measure) <type>.any))] (in (` (is (~ (@JSON#decoded inputT)) - ((~! <>.codec) (~! qty_codec) (~! </>.any)))))) + ((~! <>.codec) (~! measure_codec) (~! </>.any)))))) (do ! [[_ _ valC] (<type>.applied (all <>.and (<type>.exactly dictionary.Dictionary) |