aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/type/resource.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/type/resource.lux11
1 files changed, 6 insertions, 5 deletions
diff --git a/stdlib/source/lux/type/resource.lux b/stdlib/source/lux/type/resource.lux
index 7c9201057..096598521 100644
--- a/stdlib/source/lux/type/resource.lux
+++ b/stdlib/source/lux/type/resource.lux
@@ -6,7 +6,7 @@
[control
["p" parser
["s" code (#+ Parser)]]
- ["ex" exception (#+ exception:)]
+ ["." exception (#+ exception:)]
["." io (#+ IO)]
[concurrency
["." promise (#+ Promise)]]]
@@ -17,7 +17,7 @@
[number
["." nat]]
[text
- format]
+ ["%" format (#+ format)]]
[collection
["." set]
["." row (#+ Row)]
@@ -126,7 +126,8 @@
[read-async Promise promise.monad]))
(exception: #export (index-cannot-be-repeated {index Nat})
- (%n index))
+ (exception.report
+ ["Index" (%.nat index)]))
(exception: #export amount-cannot-be-zero)
@@ -139,7 +140,7 @@
(wrap (list))
(do @
[head s.nat
- _ (p.assert (ex.construct index-cannot-be-repeated head)
+ _ (p.assert (exception.construct index-cannot-be-repeated head)
(not (set.member? seen head)))
tail (recur (set.add head seen))]
(wrap (list& head tail))))))))
@@ -186,7 +187,7 @@
(Parser Nat)
(do p.monad
[raw s.nat
- _ (p.assert (ex.construct amount-cannot-be-zero [])
+ _ (p.assert (exception.construct amount-cannot-be-zero [])
(n/> 0 raw))]
(wrap raw)))