diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/compiler/default.lux | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/stdlib/source/lux/compiler/default.lux b/stdlib/source/lux/compiler/default.lux index 9c7b7868d..2b8aeb0a8 100644 --- a/stdlib/source/lux/compiler/default.lux +++ b/stdlib/source/lux/compiler/default.lux @@ -36,6 +36,9 @@ ## [cache/io]) ) +(exception: #export (cannot-compile-module {name Text}) + (ex.report ["Module" name])) + (type: Reader (-> .Source (Error [.Source Code]))) @@ -101,13 +104,11 @@ (def: (module-compilation-iteration reader) (-> Reader (All [anchor expression statement] <Operation>)) - (<| (phase.timed (name-of ..module-compilation-iteration) "ITERATION") - (do phase.Monad<Operation> - [code (statement.lift-analysis - (..read reader)) - _ (<| (phase.timed (name-of ..module-compilation-iteration) "PHASE") - (totalS.phase code))] - init.refresh))) + (do phase.Monad<Operation> + [code (statement.lift-analysis + (..read reader)) + _ (totalS.phase code)] + init.refresh)) (def: (module-compilation-loop module-name) (All [anchor expression statement] @@ -124,7 +125,7 @@ (#error.Error error) (if (ex.match? syntax.end-of-file error) (#error.Success [state []]) - (#error.Error error))))))) + (ex.with-stack ..cannot-compile-module module-name (#error.Error error)))))))) (def: (perform-module-compilation module-name source) (All [anchor expression statement] |