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/jvm/imports.jvm.lux | |
parent | 84d7e87817cd2c074653b34d028c8fa807febc7f (diff) |
- Adapted new-luxc's code to latest stdlib changes.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux index 892dd869f..44314fcf2 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux @@ -21,9 +21,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] + ) (host.import (java/util/concurrent/Future a) (get [] #io a)) @@ -47,7 +52,7 @@ (All [a] (-> (Promise a) (Future a))) (let [future (CompletableFuture::new [])] (exec (:: promise.Functor<Promise> map - (function [value] (CompletableFuture::complete [value] future)) + (function (_ value) (CompletableFuture::complete [value] future)) promise) future))) @@ -95,7 +100,7 @@ (-> Text (List [Text Module]) (List [Text Module]) (List [Text Module])) (|> from-dependency (list.filter (|>> product.right compiled?)) - (list/fold (function [[dep-name dep-module] total] (&.pl-put dep-name dep-module total)) + (list/fold (function (_ [dep-name dep-module] total) (&.pl-put dep-name dep-module total)) from-current))) (def: (merge-compilers current-module dependency total) @@ -120,7 +125,7 @@ (#e.Error error) (&.throw Invalid-Imports (%code (code.tuple imports))))) dependencies (monad.map @ (: (-> [Text Text] (Meta (IO (Future (Error Compiler))))) - (function [[dependency alias]] + (function (_ [dependency alias]) (do @ [_ (&.assert Module-Cannot-Import-Itself current-module (not (text/= current-module dependency))) |