diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/poly/lux/data/format/json.lux | 19 |
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)))) + ))))))) |