aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/format/json.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/data/format/json.lux')
-rw-r--r--stdlib/source/lux/data/format/json.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux
index 64064fb1f..b03cb5ae9 100644
--- a/stdlib/source/lux/data/format/json.lux
+++ b/stdlib/source/lux/data/format/json.lux
@@ -26,7 +26,7 @@
["s" syntax (#+ syntax:)]
["." code]]])
-(do-template [<name> <type>]
+(template [<name> <type>]
[(type: #export <name> <type>)]
[Null Any]
@@ -43,7 +43,7 @@
(#Array (Row JSON))
(#Object (Dictionary String JSON)))
-(do-template [<name> <type>]
+(template [<name> <type>]
[(type: #export <name> <type>)]
[Array (Row JSON)]
@@ -130,7 +130,7 @@
_
(#error.Failure ($_ text@compose "Cannot set field '" key "' of a non-object."))))
-(do-template [<name> <tag> <type> <desc>]
+(template [<name> <tag> <type> <desc>]
[(def: #export (<name> key json)
{#.doc (code.text ($_ text@compose "A JSON object field getter for " <desc> "."))}
(-> Text JSON (Error <type>))
@@ -211,7 +211,7 @@
(def: (show-null _) (-> Null Text) "null")
-(do-template [<name> <type> <codec>]
+(template [<name> <type> <codec>]
[(def: <name> (-> <type> Text) <codec>)]
[show-boolean Boolean ..encode-boolean]
@@ -290,7 +290,7 @@
(#.Cons head tail)
(#error.Success [tail head]))))
-(do-template [<name> <type> <tag> <desc>]
+(template [<name> <type> <tag> <desc>]
[(def: #export <name>
{#.doc (code.text ($_ text@compose "Reads a JSON value as " <desc> "."))}
(Reader <type>)
@@ -309,7 +309,7 @@
[string Text #String "string"]
)
-(do-template [<test> <check> <type> <eq> <encoder> <tag> <desc>]
+(template [<test> <check> <type> <eq> <encoder> <tag> <desc>]
[(def: #export (<test> test)
{#.doc (code.text ($_ text@compose "Asks whether a JSON value is a " <desc> "."))}
(-> <type> (Reader Bit))
@@ -448,7 +448,7 @@
[_ (l.this "null")]
(wrap [])))
-(do-template [<name> <token> <value>]
+(template [<name> <token> <value>]
[(def: <name>
(l.Lexer Boolean)
(do p.monad
@@ -527,7 +527,7 @@
value (json~ [])]
(wrap [key value])))
-(do-template [<name> <type> <open> <close> <elem-parser> <prep>]
+(template [<name> <type> <open> <close> <elem-parser> <prep>]
[(def: (<name> json~)
(-> (-> Any (l.Lexer JSON)) (l.Lexer <type>))
(do p.monad