From e0b3538721a71f6e8c016b12c8c257b8cebd3981 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 26 Apr 2019 18:01:12 -0400 Subject: WIP: Turning compiler tests into a re-usable specification. --- new-luxc/source/program.lux | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'new-luxc/source/program.lux') 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)) -- cgit v1.2.3