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.lux32
1 files changed, 16 insertions, 16 deletions
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index 039265ff7..3ea07e3e7 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -40,26 +40,26 @@
(-> (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)))))
+ then)}
+ {#//.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)
@@ -68,12 +68,12 @@
(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
@@ -131,7 +131,7 @@
#.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,8 +148,8 @@
(|> entries
(list\mix (function (_ entry [index next])
[(++ index)
- (#.Item [(n\encoded index) (format entry)]
- next)])
+ {#.Item [(n\encoded index) (format entry)]
+ next}])
[0 #.End])
product.right
list.reversed
@@ -173,13 +173,13 @@
(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)
_
- (..decorated (..error exception message) error)))
+ (..decorated (..error exception message) error))}
success
success))