diff options
author | Eduardo Julian | 2018-05-10 00:04:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-10 00:04:20 -0400 |
commit | 022ada35548ef5e0e3b9614f9bb96de9d2137ced (patch) | |
tree | 3e60f4dde470dbaf0c63292945aa2dda2685f881 /new-luxc/source/luxc/lang | |
parent | 66def99fde5bc0f19138a0bacd1ea41ad979ab17 (diff) |
- Re-named "Compiler" type to "Lux".
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/init.lux | 2 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/macro.lux | 2 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation.lux | 8 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/js/imports.jvm.lux | 4 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux | 3 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux | 18 |
6 files changed, 18 insertions, 19 deletions
diff --git a/new-luxc/source/luxc/lang/init.lux b/new-luxc/source/luxc/lang/init.lux index 73b2baf0a..da8fc9c07 100644 --- a/new-luxc/source/luxc/lang/init.lux +++ b/new-luxc/source/luxc/lang/init.lux @@ -34,7 +34,7 @@ #.mode #.Build}) (def: #export (compiler host) - (-> Top Compiler) + (-> Top Lux) {#.info ..info #.source dummy-source #.cursor .dummy-cursor diff --git a/new-luxc/source/luxc/lang/macro.lux b/new-luxc/source/luxc/lang/macro.lux index cde3209fc..043f0df93 100644 --- a/new-luxc/source/luxc/lang/macro.lux +++ b/new-luxc/source/luxc/lang/macro.lux @@ -30,6 +30,6 @@ (host.array-write +0 (:! Object inputs)) (host.array-write +1 (:! Object compiler)))] apply-method)] - (:! (e.Error [Compiler (List Code)]) + (:! (e.Error [Lux (List Code)]) output)))))) }) diff --git a/new-luxc/source/luxc/lang/translation.lux b/new-luxc/source/luxc/lang/translation.lux index cd9214885..4cab6d682 100644 --- a/new-luxc/source/luxc/lang/translation.lux +++ b/new-luxc/source/luxc/lang/translation.lux @@ -67,7 +67,7 @@ (wrap [annsI (:! Code annsV)]))) (def: (switch-compiler new-compiler) - (-> Compiler (Meta Aliases)) + (-> Lux (Meta Aliases)) (function (_ old-compiler) ((do macro.Monad<Meta> [this macro.current-module] @@ -75,7 +75,7 @@ new-compiler))) (def: #export (translate translate-module aliases code) - (-> (-> Text Compiler (Process Compiler)) Aliases Code (Meta Aliases)) + (-> (-> Text Lux (Process Lux)) Aliases Code (Meta Aliases)) (case code (^code ("lux module" (~ annsC))) (do macro.Monad<Meta> @@ -184,7 +184,7 @@ (def: no-aliases Aliases (dict.new text.Hash<Text>)) (def: #export (translate-module source-dirs target-dir module-name compiler) - (-> (List File) File Text Compiler (Process Compiler)) + (-> (List File) File Text Lux (Process Lux)) (do io.Monad<Process> [[file-name file-content] (&io.read source-dirs module-name) #let [module-hash (text/hash file-content) @@ -241,7 +241,7 @@ )) (def: (initialize sources target) - (-> (List File) File (Process Compiler)) + (-> (List File) File (Process Lux)) (do io.Monad<Process> [compiler (case (runtimeT.translate ## (initL.compiler (io.run js.init)) (initL.compiler (io.run hostL.init-host)) 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 64f10dabc..cbd4b2752 100644 --- a/new-luxc/source/luxc/lang/translation/js/imports.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/imports.jvm.lux @@ -30,9 +30,9 @@ (def: import (s.Syntax Import) (s.tuple (p.seq s.text s.text))) (def: #export (translate-imports translate-module annotations) - (-> (-> Text Compiler (Process Compiler)) + (-> (-> Text Lux (Process Lux)) Code - (Meta (Process Compiler))) + (Meta (Process Lux))) (do macro.Monad<Meta> [_ (moduleL.set-annotations annotations) current-module macro.current-module-name diff --git a/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux index 524433214..29db94d07 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux @@ -116,8 +116,7 @@ (def: #export $Object $.Type ($t.class "java.lang.Object" (list))) (def: #export (load-definition compiler) - (-> Compiler - (-> Ident Blob (Error Top))) + (-> Lux (-> Ident Blob (Error Top))) (function (_ (^@ def-ident [def-module def-name]) def-bytecode) (let [normal-name (format (lang.normalize-name def-name) (%n (text/hash def-name))) class-name (format (text.replace-all "/" "." def-module) "." normal-name)] 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 44314fcf2..de75a4d75 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux @@ -45,7 +45,7 @@ (def: import (s.Syntax Import) (s.tuple (p.seq s.text s.text))) (def: compilations - (Var (Dict Text (CompletableFuture (Error Compiler)))) + (Var (Dict Text (CompletableFuture (Error Lux)))) (stm.var (dict.new text.Hash<Text>))) (def: (promise-to-future promise) @@ -61,12 +61,12 @@ (:: io.Monad<IO> map (|>> #e.Success))) (def: (translate-dependency translate-module dependency compiler) - (-> (-> Text Compiler (Process Compiler)) - (-> Text Compiler (IO (Future (Error Compiler))))) + (-> (-> Text Lux (Process Lux)) + (-> Text Lux (IO (Future (Error Lux))))) (<| (Future::get []) promise-to-future (do promise.Monad<Promise> - [[new? future] (stm.commit (: (STM [Bool (CompletableFuture (Error Compiler))]) + [[new? future] (stm.commit (: (STM [Bool (CompletableFuture (Error Lux))]) (do stm.Monad<STM> [current-compilations (stm.read compilations)] (case (dict.get dependency current-compilations) @@ -75,7 +75,7 @@ #.None (do @ - [#let [pending (: (CompletableFuture (Error Compiler)) + [#let [pending (: (CompletableFuture (Error Lux)) (CompletableFuture::new []))] _ (stm.write (dict.put dependency pending current-compilations) compilations)] @@ -104,15 +104,15 @@ from-current))) (def: (merge-compilers current-module dependency total) - (-> Text Compiler Compiler Compiler) + (-> Text Lux Lux Lux) (|> total (update@ #.modules (merge-modules current-module (get@ #.modules dependency))) (set@ #.seed (get@ #.seed dependency)))) (def: #export (translate-imports translate-module annotations) - (-> (-> Text Compiler (Process Compiler)) + (-> (-> Text Lux (Process Lux)) Code - (Meta (Process Compiler))) + (Meta (Process Lux))) (do macro.Monad<Meta> [_ (moduleL.set-annotations annotations) current-module macro.current-module-name @@ -124,7 +124,7 @@ (#e.Error error) (&.throw Invalid-Imports (%code (code.tuple imports))))) - dependencies (monad.map @ (: (-> [Text Text] (Meta (IO (Future (Error Compiler))))) + dependencies (monad.map @ (: (-> [Text Text] (Meta (IO (Future (Error Lux))))) (function (_ [dependency alias]) (do @ [_ (&.assert Module-Cannot-Import-Itself current-module |