aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/format/json.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-01-12 19:39:31 -0400
committerEduardo Julian2017-01-12 19:39:31 -0400
commit1f28cd54954e8b2b978b5fa94956c8df4cbee698 (patch)
treec0ff4aaf6e57d1544402d40f461a88527f6a1cf9 /stdlib/source/lux/data/format/json.lux
parent129d3a169484c08d90a31fba5d8f59d39227c5fd (diff)
- Minor refactorings and additions.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/data/format/json.lux8
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux
index f9dafee7a..d9ef60605 100644
--- a/stdlib/source/lux/data/format/json.lux
+++ b/stdlib/source/lux/data/format/json.lux
@@ -628,8 +628,8 @@
(#;Left _) (#;Right #;None)
(#;Right x) (#;Right (#;Some x))))
-(def: #export (run parser json)
- (All [a] (-> (Parser a) JSON (Error a)))
+(def: #export (run json parser)
+ (All [a] (-> JSON (Parser a) (Error a)))
(parser json))
(def: #export (ensure test parser json)
@@ -710,7 +710,7 @@
(struct: #export _ (Codec Text JSON)
(def: encode show-json)
- (def: decode (lexer;run (json~' []))))
+ (def: decode (lambda [input] (lexer;run input (json~' [])))))
## [Syntax]
(type: Shape
@@ -980,7 +980,7 @@
(lambda [(~ g!key)]
(do Monad<Error>
[(~ g!val) (;;get (~ g!key) (~ g!input))
- (~ g!val) (;;run (~ .val.) (~ g!val))]
+ (~ g!val) (;;run (~ g!val) (~ .val.))]
((~ (' wrap)) [(~ g!key) (~ g!val)])))
(~ g!key))))
)))