diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/control/exception.lux | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux index 65ddd84f1..7515cb9fb 100644 --- a/stdlib/source/library/lux/control/exception.lux +++ b/stdlib/source/library/lux/control/exception.lux @@ -57,7 +57,7 @@ then)) (#//.Failure error))))) -(def: #export (otherwise to_do try) +(def: #export (otherwise else try) {#.doc "If no handler could be found to catch the exception, then run a function as a last-resort measure."} (All [a] (-> (-> Text a) (Try a) a)) @@ -66,7 +66,7 @@ output (#//.Failure error) - (to_do error))) + (else error))) (def: #export (return value) {#.doc "A way to lift normal values into the error-handling context."} @@ -106,7 +106,7 @@ (macro.with_gensyms [g!descriptor] (do meta.monad [current_module meta.current_module_name - #let [descriptor ($_ text\compose "{" current_module "." name "}" text.new_line) + .let [descriptor ($_ text\compose "{" current_module "." name "}" text.new_line) g!self (code.local_identifier name)]] (in (list (` (def: (~+ (|export|.format export)) (~ g!self) @@ -116,8 +116,7 @@ {#..label (~ g!descriptor) #..constructor (function ((~ g!self) [(~+ (list\map (get@ #|input|.binding) inputs))]) ((~! text\compose) (~ g!descriptor) - (~ (maybe.else (' "") body))))}))))) - ))) + (~ (maybe.else (' "") body))))})))))))) (def: (report' entries) (-> (List [Text Text]) Text) |