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.lux25
1 files changed, 13 insertions, 12 deletions
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index c59767584..cf00522fa 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -27,8 +27,9 @@
["//" try (#+ Try)]])
(type: .public (Exception a)
- {#label Text
- #constructor (-> a Text)})
+ (Record
+ {#label Text
+ #constructor (-> a Text)}))
(def: .public (match? exception error)
(All [e] (-> (Exception e) Text Bit))
@@ -93,16 +94,16 @@
(macro.with_identifiers [g!descriptor]
(do meta.monad
[current_module meta.current_module_name
- .let [descriptor ($_ text\compose "{" current_module "." name "}" text.new_line)
+ .let [descriptor ($_ text\composite "{" current_module "." name "}" text.new_line)
g!self (code.local_identifier name)]]
(in (list (` (def: (~ export_policy)
(~ g!self)
- (All [(~+ (list\map |type_variable|.format t_vars))]
- (..Exception [(~+ (list\map (value@ #|input|.type) inputs))]))
+ (All [(~+ (list\each |type_variable|.format t_vars))]
+ (..Exception [(~+ (list\each (value@ #|input|.type) inputs))]))
(let [(~ g!descriptor) (~ (code.text descriptor))]
{#..label (~ g!descriptor)
- #..constructor (function ((~ g!self) [(~+ (list\map (value@ #|input|.binding) inputs))])
- ((~! text\compose) (~ g!descriptor)
+ #..constructor (function ((~ g!self) [(~+ (list\each (value@ #|input|.binding) inputs))])
+ ((~! text\composite) (~ g!descriptor)
(~ (maybe.else (' "") body))))}))))))))
(def: (report' entries)
@@ -116,7 +117,7 @@
(list.repeated (n.+ (text.size header_separator)
largest_header_size))
text.together
- (text\compose text.new_line))
+ (text\composite text.new_line))
on_entry (: (-> [Text Text] Text)
(function (_ [header message])
(let [padding (|> " "
@@ -125,21 +126,21 @@
text.together)]
(|> message
(text.replaced text.new_line on_new_line)
- ($_ text\compose padding header header_separator)))))]
+ ($_ text\composite padding header header_separator)))))]
(case entries
#.End
""
(#.Item head tail)
(list\mix (function (_ post pre)
- ($_ text\compose pre text.new_line (on_entry post)))
+ ($_ text\composite pre text.new_line (on_entry post)))
(on_entry head)
tail))))
(syntax: .public (report [entries (<>.many (<code>.tuple (<>.and <code>.any <code>.any)))])
(in (list (` ((~! report') (list (~+ (|> entries
- (list\map (function (_ [header message])
- (` [(~ header) (~ message)])))))))))))
+ (list\each (function (_ [header message])
+ (` [(~ header) (~ message)])))))))))))
(def: .public (listing format entries)
(All [a]