diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/poly/lux/abstract/functor.lux | 5 | ||||
-rw-r--r-- | stdlib/source/poly/lux/data/format/json.lux | 17 |
2 files changed, 12 insertions, 10 deletions
diff --git a/stdlib/source/poly/lux/abstract/functor.lux b/stdlib/source/poly/lux/abstract/functor.lux index 66ea54f50..1ef5c4137 100644 --- a/stdlib/source/poly/lux/abstract/functor.lux +++ b/stdlib/source/poly/lux/abstract/functor.lux @@ -104,5 +104,6 @@ (Arg<?> inputC)) (p.fail (format "Cannot create Functor for: " (%.type inputT)))))] (wrap (` (: (~ (@Functor inputT)) - (structure (def: ((~' map) (~ funcC) (~ inputC)) - (~ outputC)))))))) + (implementation + (def: ((~' map) (~ funcC) (~ inputC)) + (~ outputC)))))))) diff --git a/stdlib/source/poly/lux/data/format/json.lux b/stdlib/source/poly/lux/data/format/json.lux index 1efbf39a8..cf3076f72 100644 --- a/stdlib/source/poly/lux/data/format/json.lux +++ b/stdlib/source/poly/lux/data/format/json.lux @@ -56,7 +56,7 @@ (def: low_mask Nat (|> 1 (i64.left_shift 32) dec)) (def: high_mask Nat (|> low_mask (i64.left_shift 32))) -(structure: nat_codec +(implementation: nat_codec (codec.Codec JSON Nat) (def: (encode input) @@ -72,7 +72,7 @@ (wrap (n.+ (|> high frac.int .nat (i64.left_shift 32)) (|> low frac.int .nat)))))))) -(structure: int_codec +(implementation: int_codec (codec.Codec JSON Int) (def: encode (|>> .nat (\ nat_codec encode))) @@ -87,7 +87,7 @@ #.None #/.Null (#.Some value) (writer value)))) -(structure: qty_codec +(implementation: qty_codec (All [unit] (codec.Codec JSON (unit.Qty unit))) @@ -343,8 +343,9 @@ (derived: (..codec Record)))} (wrap (list (` (: (codec.Codec /.JSON (~ inputT)) - (structure (def: (~' encode) - ((~! ..encode) (~ inputT))) - (def: (~' decode) - ((~! </>.run) ((~! ..decode) (~ inputT)))) - )))))) + (implementation + (def: (~' encode) + ((~! ..encode) (~ inputT))) + (def: (~' decode) + ((~! </>.run) ((~! ..decode) (~ inputT)))) + )))))) |