From 022ada35548ef5e0e3b9614f9bb96de9d2137ced Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Thu, 10 May 2018 00:04:20 -0400
Subject: - Re-named "Compiler" type to "Lux".
---
.../source/luxc/lang/translation/js/imports.jvm.lux | 4 ++--
.../source/luxc/lang/translation/jvm/common.jvm.lux | 3 +--
.../source/luxc/lang/translation/jvm/imports.jvm.lux | 18 +++++++++---------
3 files changed, 12 insertions(+), 13 deletions(-)
(limited to 'new-luxc/source/luxc/lang/translation')
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
[_ (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)))
(def: (promise-to-future promise)
@@ -61,12 +61,12 @@
(:: io.Monad 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
- [[new? future] (stm.commit (: (STM [Bool (CompletableFuture (Error Compiler))])
+ [[new? future] (stm.commit (: (STM [Bool (CompletableFuture (Error Lux))])
(do stm.Monad
[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
[_ (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
--
cgit v1.2.3