aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/program.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-04-26 18:01:12 -0400
committerEduardo Julian2019-04-26 18:01:12 -0400
commite0b3538721a71f6e8c016b12c8c257b8cebd3981 (patch)
tree1263740cda4bff9311e58d5bb217e7565060d724 /new-luxc/source/program.lux
parentf2c0473640e8029f27797f6ecf21662dddb0685b (diff)
WIP: Turning compiler tests into a re-usable specification.
Diffstat (limited to 'new-luxc/source/program.lux')
-rw-r--r--new-luxc/source/program.lux13
1 files changed, 8 insertions, 5 deletions
diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux
index 0936b51dd..de4445d5f 100644
--- a/new-luxc/source/program.lux
+++ b/new-luxc/source/program.lux
@@ -57,7 +57,7 @@
(@.array-write 0 _object-class)
(@.array-write 1 _object-class)))
-(def: (expander macro inputs lux)
+(def: #export (expander macro inputs lux)
Expander
(do error.monad
[apply-method (|> macro
@@ -72,7 +72,7 @@
(@.array-write 1 (:coerce java/lang/Object lux)))
apply-method))))
-(def: jvm
+(def: #export jvm
(IO (Platform IO _.Anchor _.Inst _.Definition))
(do io.monad
[host jvm.host]
@@ -82,7 +82,7 @@
#platform.phase expression.translate
#platform.runtime runtime.translate})))
-(def: (program programI)
+(def: #export (program programI)
(-> _.Inst _.Definition)
(let [nilI runtime.noneI
num-inputsI (|>> ($i.ALOAD 0) $i.ARRAYLENGTH)
@@ -147,10 +147,13 @@
$i.POP
$i.RETURN))))]))
+(def: #export bundle
+ (dictionary.merge common.bundle
+ host.bundle))
+
(program: [{service /cli.service}]
(/.compiler ..expander
..jvm
- (dictionary.merge common.bundle
- host.bundle)
+ ..bundle
..program
service))