aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/control/exception.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/control/exception.lux')
-rw-r--r--stdlib/source/lux/control/exception.lux22
1 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/source/lux/control/exception.lux b/stdlib/source/lux/control/exception.lux
index 401a3057c..560928bf2 100644
--- a/stdlib/source/lux/control/exception.lux
+++ b/stdlib/source/lux/control/exception.lux
@@ -1,8 +1,8 @@
(;module: {#;doc "Exception-handling functionality built on top of the Result type."}
lux
(lux (control monad)
- (data ["R" result #- fail]
- [text "T/" Monoid<Text>])
+ (data ["R" result]
+ [text "text/" Monoid<Text>])
[macro]
(macro [code]
["s" syntax #+ syntax: Syntax]
@@ -16,9 +16,9 @@
(-> Text Text))
## [Values]
-(def: #hidden _T/append_
+(def: #hidden _text/append_
(-> Text Text Text)
- T/append)
+ text/append)
(def: #export (match? exception error)
(-> Exception Text Bool)
@@ -29,8 +29,8 @@
If no exception was detected, or a different one from the one being checked, then pass along the original value."}
(All [a]
- (-> Exception (-> Text a) (Result a)
- (Result a)))
+ (-> Exception (-> Text a) (R;Result a)
+ (R;Result a)))
(case try
(#R;Success output)
(#R;Success output)
@@ -47,7 +47,7 @@
(def: #export (otherwise to-do 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) (Result a) a))
+ (-> (-> Text a) (R;Result a) a))
(case try
(#R;Success output)
output
@@ -57,12 +57,12 @@
(def: #export (return value)
{#;doc "A way to lift normal values into the result-handling context."}
- (All [a] (-> a (Result a)))
+ (All [a] (-> a (R;Result a)))
(#R;Success value))
(def: #export (throw exception message)
{#;doc "Decorate an error message with an Exception and lift it into the result-handling context."}
- (All [a] (-> Exception Text (Result a)))
+ (All [a] (-> Exception Text (R;Result a)))
(#R;Error (exception message)))
(syntax: #export (exception: [_ex-lev csr;export] [name s;local-symbol])
@@ -71,8 +71,8 @@
(exception: #export Some-Exception))}
(do @
[current-module macro;current-module-name
- #let [descriptor ($_ T/append "{" current-module ";" name "}" "\n")
+ #let [descriptor ($_ text/append "{" current-module ";" name "}" "\n")
g!message (code;symbol ["" "message"])]]
(wrap (list (` (def: (~@ (csw;export _ex-lev)) ((~ (code;symbol ["" name])) (~ g!message))
Exception
- (_T/append_ (~ (code;text descriptor)) (~ g!message))))))))
+ (_text/append_ (~ (code;text descriptor)) (~ g!message))))))))