aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/poly/lux/data/format/json.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-06-11 00:10:52 -0400
committerEduardo Julian2022-06-11 00:10:52 -0400
commit5b36c00da8a21c5d70adec4b50ef573e12dc5cf8 (patch)
treea1549d05cce57d20745c0835ea2419858fc30a4e /stdlib/source/poly/lux/data/format/json.lux
parentf21ca0dc1956a47b8f7ac6e0ea67d7d246c55280 (diff)
De-sigil-ification: : [Part 2]
Diffstat (limited to '')
-rw-r--r--stdlib/source/poly/lux/data/format/json.lux19
1 files changed, 10 insertions, 9 deletions
diff --git a/stdlib/source/poly/lux/data/format/json.lux b/stdlib/source/poly/lux/data/format/json.lux
index a10f632d8..71bd8cea4 100644
--- a/stdlib/source/poly/lux/data/format/json.lux
+++ b/stdlib/source/poly/lux/data/format/json.lux
@@ -19,7 +19,7 @@
["[0]" sequence (.only sequence)]
["[0]" dictionary]]]
[macro
- [syntax (.only syntax:)]
+ [syntax (.only syntax)]
["[0]" code]]
[math
[number
@@ -324,11 +324,12 @@
(<>.failure (format "Cannot create JSON decoder for: " (type.format inputT)))
))))
-(syntax: .public (codec [inputT <code>.any])
- (in (.list (` (is (codec.Codec /.JSON (~ inputT))
- (implementation
- (def: (~' encoded)
- ((~! ..encoded) (~ inputT)))
- (def: (~' decoded)
- ((~! </>.result) ((~! ..decoded) (~ inputT))))
- ))))))
+(def: .public codec
+ (syntax (_ [inputT <code>.any])
+ (in (.list (` (is (codec.Codec /.JSON (~ inputT))
+ (implementation
+ (def: (~' encoded)
+ ((~! ..encoded) (~ inputT)))
+ (def: (~' decoded)
+ ((~! </>.result) ((~! ..decoded) (~ inputT))))
+ )))))))