aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/exception.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-03-14 03:33:01 -0400
committerEduardo Julian2022-03-14 03:33:01 -0400
commit93eb82e1bf6d2f2a6b3b0adb85f4ab93cbb766a9 (patch)
tree9301db84130bb3714d57db1196e80e7325b7f880 /stdlib/source/library/lux/control/exception.lux
parentb8681fd206d5b5076b9737ee54f0cb0405a898d6 (diff)
De-sigil-ification: @
Diffstat (limited to 'stdlib/source/library/lux/control/exception.lux')
-rw-r--r--stdlib/source/library/lux/control/exception.lux62
1 files changed, 31 insertions, 31 deletions
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index 5e78a155e..942ebbfd8 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -1,30 +1,30 @@
(.using
- [library
- [lux "*"
- ["[0]" macro]
- ["[0]" meta]
- [abstract
- [monad {"+" do}]]
- [control
- ["[0]" maybe]
- ["<>" parser ("[1]#[0]" monad)
- ["<[0]>" code {"+" Parser}]]]
- [data
- ["[0]" product]
- ["[0]" text ("[1]#[0]" monoid)]
- [collection
- ["[0]" list ("[1]#[0]" functor mix)]]]
- [macro
- ["[0]" code]
- [syntax {"+" syntax:}
- ["|[0]|" input]
- ["[0]" type "_"
- ["|[1]_[0]|" variable]]]]
- [math
- [number
- ["n" nat ("[1]#[0]" decimal)]]]]]
- [//
- ["//" try {"+" Try}]])
+ [library
+ [lux "*"
+ ["[0]" macro]
+ ["[0]" meta]
+ [abstract
+ [monad {"+" do}]]
+ [control
+ ["[0]" maybe]
+ ["<>" parser ("[1]#[0]" monad)
+ ["<[0]>" code {"+" Parser}]]]
+ [data
+ ["[0]" product]
+ ["[0]" text ("[1]#[0]" monoid)]
+ [collection
+ ["[0]" list ("[1]#[0]" functor mix)]]]
+ [macro
+ ["[0]" code]
+ [syntax {"+" syntax:}
+ ["|[0]|" input]
+ ["[0]" type "_"
+ ["|[1]_[0]|" variable]]]]
+ [math
+ [number
+ ["n" nat ("[1]#[0]" decimal)]]]]]
+ [//
+ ["//" try {"+" Try}]])
(type: .public (Exception a)
(Record
@@ -33,7 +33,7 @@
(def: .public (match? exception error)
(All (_ e) (-> (Exception e) Text Bit))
- (text.starts_with? (value@ #label exception) error))
+ (text.starts_with? (the #label exception) error))
(def: .public (when exception then try)
(All (_ e a)
@@ -44,7 +44,7 @@
{//.#Success output}
{//.#Failure error}
- (let [reference (value@ #label exception)]
+ (let [reference (the #label exception)]
(if (text.starts_with? reference error)
{//.#Success (|> error
(text.clip_since (text.size reference))
@@ -64,7 +64,7 @@
(def: .public (error exception message)
(All (_ e) (-> (Exception e) e Text))
- ((value@ ..#constructor exception) message))
+ ((the ..#constructor exception) message))
(def: .public (except exception message)
(All (_ e a) (-> (Exception e) e (Try a)))
@@ -99,10 +99,10 @@
(in (list (` (def: (~ export_policy)
(~ g!self)
(All ((~ g!_) (~+ (list#each |type_variable|.format t_vars)))
- (..Exception [(~+ (list#each (value@ |input|.#type) inputs))]))
+ (..Exception [(~+ (list#each (the |input|.#type) inputs))]))
(let [(~ g!descriptor) (~ (code.text descriptor))]
[..#label (~ g!descriptor)
- ..#constructor (function ((~ g!self) [(~+ (list#each (value@ |input|.#binding) inputs))])
+ ..#constructor (function ((~ g!self) [(~+ (list#each (the |input|.#binding) inputs))])
((~! text#composite) (~ g!descriptor)
(~ (maybe.else (' "") body))))]))))))))