aboutsummaryrefslogtreecommitdiff
path: root/lux-bootstrapper
diff options
context:
space:
mode:
authorEduardo Julian2021-07-11 01:51:04 -0400
committerEduardo Julian2021-07-11 01:51:04 -0400
commitabe24425ced15fd784ef6c62d6f186af72b491db (patch)
tree42b6e3cbd179c83fae8941fa4b128b13afc766f5 /lux-bootstrapper
parent4610968193df10af12c91f699fec39aeb3ef703a (diff)
Re-named ":coerce" to ":as" since it technically doesn't do coercions.
Diffstat (limited to '')
-rw-r--r--code_of_conduct.md (renamed from lux-bootstrapper/code_of_conduct.md)0
-rw-r--r--lux-bootstrapper/commands.md17
-rw-r--r--lux-bootstrapper/src/lux/analyser.clj10
-rw-r--r--lux-bootstrapper/src/lux/analyser/lux.clj4
4 files changed, 24 insertions, 7 deletions
diff --git a/lux-bootstrapper/code_of_conduct.md b/code_of_conduct.md
index 01b8644f1..01b8644f1 100644
--- a/lux-bootstrapper/code_of_conduct.md
+++ b/code_of_conduct.md
diff --git a/lux-bootstrapper/commands.md b/lux-bootstrapper/commands.md
new file mode 100644
index 000000000..33fa874ba
--- /dev/null
+++ b/lux-bootstrapper/commands.md
@@ -0,0 +1,17 @@
+# Old/bootstrapping compiler
+
+## Build & install
+
+```
+cd ~/lux/lux-bootstrapper/ \
+&& lein clean \
+&& lein install
+```
+
+## Run JBE (Read generated bytecode)
+
+```
+cd ~/lux/jbe/bin/ \
+&& java ee.ioc.cs.jbe.browser.BrowserApplication
+```
+
diff --git a/lux-bootstrapper/src/lux/analyser.clj b/lux-bootstrapper/src/lux/analyser.clj
index af272fa91..792006ed1 100644
--- a/lux-bootstrapper/src/lux/analyser.clj
+++ b/lux-bootstrapper/src/lux/analyser.clj
@@ -109,23 +109,23 @@
(|case command
(&/$Text ?procedure)
(case ?procedure
- "lux check"
+ "lux type check"
(|let [(&/$Cons ?type
(&/$Cons ?value
(&/$Nil))) parameters]
(&/with-analysis-meta location exo-type
- (&&lux/analyse-ann analyse eval! exo-type ?type ?value)))
+ (&&lux/analyse-type-check analyse eval! exo-type ?type ?value)))
- "lux check type"
+ "lux type check type"
(|let [(&/$Cons ?value (&/$Nil)) parameters]
(analyse-ast optimize eval! compile-module compilers &type/Type ?value))
- "lux coerce"
+ "lux type as"
(|let [(&/$Cons ?type
(&/$Cons ?value
(&/$Nil))) parameters]
(&/with-analysis-meta location exo-type
- (&&lux/analyse-coerce analyse eval! exo-type ?type ?value)))
+ (&&lux/analyse-type-as analyse eval! exo-type ?type ?value)))
"lux def"
(|let [(&/$Cons [_ (&/$Identifier "" ?name)]
diff --git a/lux-bootstrapper/src/lux/analyser/lux.clj b/lux-bootstrapper/src/lux/analyser/lux.clj
index 63bc675de..b3c2edbd9 100644
--- a/lux-bootstrapper/src/lux/analyser/lux.clj
+++ b/lux-bootstrapper/src/lux/analyser/lux.clj
@@ -703,7 +703,7 @@
(&&/|meta new-type _location
_analysis)))
-(defn analyse-ann [analyse eval! exo-type ?type ?value]
+(defn analyse-type-check [analyse eval! exo-type ?type ?value]
(|do [=type (&&/analyse-1 analyse &type/Type ?type)
==type (eval! =type)
_ (&type/check exo-type ==type)
@@ -713,7 +713,7 @@
(&&/$ann =value =type)
)))))
-(defn analyse-coerce [analyse eval! exo-type ?type ?value]
+(defn analyse-type-as [analyse eval! exo-type ?type ?value]
(|do [=type (&&/analyse-1 analyse &type/Type ?type)
==type (eval! =type)
_ (&type/check exo-type ==type)