diff options
author | Eduardo Julian | 2018-04-06 08:32:41 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-04-06 08:32:41 -0400 |
commit | ca238f9c89d3156842b0a3d5fe24a5d69b2eedb0 (patch) | |
tree | 50ba106541f2357daf27393df28e8b263f7311e1 /new-luxc/source/luxc/lang/translation/js/imports.jvm.lux | |
parent | 84d7e87817cd2c074653b34d028c8fa807febc7f (diff) |
- Adapted new-luxc's code to latest stdlib changes.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/js/imports.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/js/imports.jvm.lux | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js/imports.jvm.lux b/new-luxc/source/luxc/lang/translation/js/imports.jvm.lux index 725aff705..64f10dabc 100644 --- a/new-luxc/source/luxc/lang/translation/js/imports.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/imports.jvm.lux @@ -14,9 +14,14 @@ (luxc [lang] (lang [".L" module]))) -(exception: #export Invalid-Imports) -(exception: #export Module-Cannot-Import-Itself) -(exception: #export Circular-Dependency) +(do-template [<name>] + [(exception: #export (<name> {message Text}) + message)] + + [Invalid-Imports] + [Module-Cannot-Import-Itself] + [Circular-Dependency] + ) (type: Import {#module Text @@ -39,7 +44,7 @@ (#e.Error error) (lang.throw Invalid-Imports (%code (code.tuple imports))))) - _ (monad.map @ (function [[dependency alias]] + _ (monad.map @ (function (_ [dependency alias]) (do @ [_ (lang.assert Module-Cannot-Import-Itself current-module (not (text/= current-module dependency))) @@ -58,7 +63,7 @@ imports) compiler macro.get-compiler] (wrap (monad.fold io.Monad<Process> - (function [import] + (function (_ import) (translate-module (get@ #module import))) compiler imports)))) |