aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/poly/lux/data/format/json.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/poly/lux/data/format/json.lux')
-rw-r--r--stdlib/source/poly/lux/data/format/json.lux17
1 files changed, 9 insertions, 8 deletions
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))))
+ ))))))