From 1f28cd54954e8b2b978b5fa94956c8df4cbee698 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 12 Jan 2017 19:39:31 -0400 Subject: - Minor refactorings and additions. --- stdlib/source/lux/data/format/json.lux | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'stdlib/source/lux/data/format/json.lux') 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 [(~ 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)))) ))) -- cgit v1.2.3