aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/base.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/base.lux')
-rw-r--r--new-luxc/source/luxc/base.lux10
1 files changed, 6 insertions, 4 deletions
diff --git a/new-luxc/source/luxc/base.lux b/new-luxc/source/luxc/base.lux
index 74e316b3c..ee2d4464d 100644
--- a/new-luxc/source/luxc/base.lux
+++ b/new-luxc/source/luxc/base.lux
@@ -12,7 +12,7 @@
(-> Type Code (Lux Top)))
(type: #export Analyser
- (-> Eval Code (Lux la;Analysis)))
+ (-> Code (Lux la;Analysis)))
(type: #export Path Text)
@@ -100,15 +100,17 @@
(#E;Success [(set@ #;source old-source compiler')
output])))))
-(def: #export (with-try handler action)
- (All [a] (-> (-> Text (Lux a)) (Lux a) (Lux a)))
+(def: #export (with-stacked-errors handler action)
+ (All [a] (-> (-> [] Text) (Lux a) (Lux a)))
(function [compiler]
(case (action compiler)
(#E;Success [compiler' output])
(#E;Success [compiler' output])
(#E;Error error)
- ((handler error) compiler))))
+ (#E;Error (if (T/= "" error)
+ (handler [])
+ (format error "\n-----------------------------------------\n" (handler [])))))))
(def: fresh-bindings
(All [k v] (Bindings k v))