aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/tool/compiler/phase/translation.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/tool/compiler/phase/translation.lux35
1 files changed, 20 insertions, 15 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/translation.lux b/stdlib/source/lux/tool/compiler/phase/translation.lux
index 6ee7f3841..99a4c5517 100644
--- a/stdlib/source/lux/tool/compiler/phase/translation.lux
+++ b/stdlib/source/lux/tool/compiler/phase/translation.lux
@@ -1,8 +1,8 @@
(.module:
[lux #*
[control
- ["ex" exception (#+ exception:)]
- [monad (#+ do)]]
+ [monad (#+ do)]
+ ["." exception (#+ exception:)]]
[data
["." product]
["." error (#+ Error)]
@@ -15,8 +15,9 @@
[world
[file (#+ Path)]]]
["." //
- [synthesis (#+ Synthesis)]
- ["." extension]])
+ ["." extension]
+ [//
+ [synthesis (#+ Synthesis)]]])
(do-template [<name>]
[(exception: #export (<name>)
@@ -27,21 +28,25 @@
)
(exception: #export (cannot-interpret {error Text})
- (ex.report ["Error" error]))
+ (exception.report
+ ["Error" error]))
(exception: #export (unknown-lux-name {name Name})
- (ex.report ["Name" (%name name)]))
+ (exception.report
+ ["Name" (%name name)]))
(exception: #export (cannot-overwrite-lux-name {lux-name Name}
{old-host-name Text}
{new-host-name Text})
- (ex.report ["Lux Name" (%name lux-name)]
- ["Old Host Name" old-host-name]
- ["New Host Name" new-host-name]))
+ (exception.report
+ ["Lux Name" (%name lux-name)]
+ ["Old Host Name" old-host-name]
+ ["New Host Name" new-host-name]))
(do-template [<name>]
[(exception: #export (<name> {name Name})
- (ex.report ["Output" (%name name)]))]
+ (exception.report
+ ["Output" (%name name)]))]
[cannot-overwrite-output]
[no-buffer-for-saving-code]
@@ -141,7 +146,7 @@
(#error.Success [stateE output])
#.None
- (ex.throw <exception> []))))]
+ (exception.throw <exception> []))))]
[#anchor
(with-anchor anchor)
@@ -181,7 +186,7 @@
(#error.Success [state+ output])
(#error.Failure error)
- (ex.throw cannot-interpret error))))]
+ (exception.throw cannot-interpret error))))]
[evaluate! expression]
[execute! statement]
@@ -196,7 +201,7 @@
(#error.Success [stateE output])
(#error.Failure error)
- (ex.throw cannot-interpret error))))
+ (exception.throw cannot-interpret error))))
(def: #export (save! name code)
(All [anchor expression statement]
@@ -231,7 +236,7 @@
(#error.Success [stateE host-name])
#.None
- (ex.throw unknown-lux-name lux-name)))))
+ (exception.throw unknown-lux-name lux-name)))))
(def: #export (learn lux-name host-name)
(All [anchor expression statement]
@@ -247,4 +252,4 @@
[]])
(#.Some old-host-name)
- (ex.throw cannot-overwrite-lux-name [lux-name old-host-name host-name])))))
+ (exception.throw cannot-overwrite-lux-name [lux-name old-host-name host-name])))))