aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/parser/lux/data/format/json.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/parser/lux/data/format/json.lux')
-rw-r--r--stdlib/source/parser/lux/data/format/json.lux14
1 files changed, 8 insertions, 6 deletions
diff --git a/stdlib/source/parser/lux/data/format/json.lux b/stdlib/source/parser/lux/data/format/json.lux
index e1c1178e0..aff96d9b7 100644
--- a/stdlib/source/parser/lux/data/format/json.lux
+++ b/stdlib/source/parser/lux/data/format/json.lux
@@ -6,7 +6,7 @@
[control
["//" parser (.use "[1]#[0]" functor)]
["[0]" try (.only Try)]
- ["[0]" exception (.only exception)]]
+ ["[0]" exception (.only Exception)]]
[data
["[0]" bit]
["[0]" text (.use "[1]#[0]" equivalence monoid)]
@@ -25,11 +25,12 @@
(type .public (Parser a)
(//.Parser (List JSON) a))
-(exception .public (unconsumed_input [input (List JSON)])
+(exception.def .public (unconsumed_input input)
+ (Exception (List JSON))
(exception.report
(list ["Input" (exception.listing /.format input)])))
-(exception .public empty_input)
+(exception.def .public empty_input)
(def .public (result parser json)
(All (_ a) (-> (Parser a) JSON (Try a)))
@@ -55,7 +56,8 @@
{.#Item head tail}
{try.#Success [tail head]})))
-(exception .public (unexpected_value [value JSON])
+(exception.def .public (unexpected_value value)
+ (Exception JSON)
(exception.report
(list ["Value" (/.format value)])))
@@ -77,8 +79,8 @@
[string /.String /.#String]
)
-(exception .public [a] (value_mismatch [reference JSON
- sample JSON])
+(exception.def .public (value_mismatch [reference sample])
+ (Exception [JSON JSON])
(exception.report
(list ["Reference" (/.format reference)]
["Sample" (/.format sample)])))