aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/exception.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/control/exception.lux38
1 files changed, 19 insertions, 19 deletions
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index 5c8231e72..455318e39 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -40,40 +40,40 @@
(-> (Exception e) (-> Text a) (Try a)
(Try a)))
(case try
- {#//.Success output}
- {#//.Success output}
+ {//.#Success output}
+ {//.#Success output}
- {#//.Failure error}
+ {//.#Failure error}
(let [reference (value@ #label exception)]
(if (text.starts_with? reference error)
- {#//.Success (|> error
+ {//.#Success (|> error
(text.clip_since (text.size reference))
maybe.trusted
then)}
- {#//.Failure error}))))
+ {//.#Failure error}))))
(def: .public (otherwise else try)
(All (_ a)
(-> (-> Text a) (Try a) a))
(case try
- {#//.Success output}
+ {//.#Success output}
output
- {#//.Failure error}
+ {//.#Failure error}
(else error)))
(def: .public (error exception message)
(All (_ e) (-> (Exception e) e Text))
- ((value@ #..constructor exception) message))
+ ((value@ ..#constructor exception) message))
(def: .public (except exception message)
(All (_ e a) (-> (Exception e) e (Try a)))
- {#//.Failure (..error exception message)})
+ {//.#Failure (..error exception message)})
(def: .public (assertion exception message test)
(All (_ e) (-> (Exception e) e Bit (Try Any)))
(if test
- {#//.Success []}
+ {//.#Success []}
(..except exception message)))
(def: exception
@@ -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 (value@ |input|.#type) inputs))]))
(let [(~ g!descriptor) (~ (code.text descriptor))]
- [#..label (~ g!descriptor)
- #..constructor (function ((~ g!self) [(~+ (list\each (value@ #|input|.binding) inputs))])
+ [..#label (~ g!descriptor)
+ ..#constructor (function ((~ g!self) [(~+ (list\each (value@ |input|.#binding) inputs))])
((~! text\composite) (~ g!descriptor)
(~ (maybe.else (' "") body))))]))))))))
@@ -128,10 +128,10 @@
(text.replaced text.new_line on_new_line)
($_ text\composite padding header header_separator)))))]
(case entries
- #.End
+ {.#End}
""
- {#.Item head tail}
+ {.#Item head tail}
(list\mix (function (_ post pre)
($_ text\composite pre text.new_line (on_entry post)))
(on_entry head)
@@ -148,9 +148,9 @@
(|> entries
(list\mix (function (_ entry [index next])
[(++ index)
- {#.Item [(n\encoded index) (format entry)]
+ {.#Item [(n\encoded index) (format entry)]
next}])
- [0 #.End])
+ [0 {.#End}])
product.right
list.reversed
..report'))
@@ -173,8 +173,8 @@
(def: .public (with exception message computation)
(All (_ e a) (-> (Exception e) e (Try a) (Try a)))
(case computation
- {#//.Failure error}
- {#//.Failure (case error
+ {//.#Failure error}
+ {//.#Failure (case error
""
(..error exception message)