aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/exception.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/control/exception.lux')
-rw-r--r--stdlib/source/library/lux/control/exception.lux20
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index bdca98684..4998142f7 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -32,11 +32,11 @@
#constructor (-> a Text)}))
(def: .public (match? exception error)
- (All [e] (-> (Exception e) Text Bit))
+ (All (_ e) (-> (Exception e) Text Bit))
(text.starts_with? (value@ #label exception) error))
(def: .public (when exception then try)
- (All [e a]
+ (All (_ e a)
(-> (Exception e) (-> Text a) (Try a)
(Try a)))
(case try
@@ -53,7 +53,7 @@
(#//.Failure error)))))
(def: .public (otherwise else try)
- (All [a]
+ (All (_ a)
(-> (-> Text a) (Try a) a))
(case try
(#//.Success output)
@@ -63,15 +63,15 @@
(else error)))
(def: .public (error exception message)
- (All [e] (-> (Exception e) e Text))
+ (All (_ e) (-> (Exception e) e Text))
((value@ #..constructor exception) message))
(def: .public (except exception message)
- (All [e a] (-> (Exception e) e (Try a)))
+ (All (_ e a) (-> (Exception e) e (Try a)))
(#//.Failure (..error exception message)))
(def: .public (assertion exception message test)
- (All [e] (-> (Exception e) e Bit (Try Any)))
+ (All (_ e) (-> (Exception e) e Bit (Try Any)))
(if test
(#//.Success [])
(..except exception message)))
@@ -91,14 +91,14 @@
)))
(syntax: .public (exception: [[export_policy t_vars [name inputs] body] ..exception])
- (macro.with_identifiers [g!descriptor]
+ (macro.with_identifiers [g!_ g!descriptor]
(do meta.monad
[current_module meta.current_module_name
.let [descriptor ($_ text\composite "{" current_module "." name "}" text.new_line)
g!self (code.local_identifier name)]]
(in (list (` (def: (~ export_policy)
(~ g!self)
- (All [(~+ (list\each |type_variable|.format t_vars))]
+ (All ((~ g!_) (~+ (list\each |type_variable|.format t_vars)))
(..Exception [(~+ (list\each (value@ #|input|.type) inputs))]))
(let [(~ g!descriptor) (~ (code.text descriptor))]
{#..label (~ g!descriptor)
@@ -143,7 +143,7 @@
(` [(~ header) (~ message)])))))))))))
(def: .public (listing format entries)
- (All [a]
+ (All (_ a)
(-> (-> a Text) (List a) Text))
(|> entries
(list\mix (function (_ entry [index next])
@@ -171,7 +171,7 @@
error))
(def: .public (with exception message computation)
- (All [e a] (-> (Exception e) e (Try a) (Try a)))
+ (All (_ e a) (-> (Exception e) e (Try a) (Try a)))
(case computation
(#//.Failure error)
(#//.Failure (case error