aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm
diff options
context:
space:
mode:
Diffstat (limited to 'lux-jvm')
-rw-r--r--lux-jvm/project.clj4
-rw-r--r--lux-jvm/source/program.lux52
2 files changed, 29 insertions, 27 deletions
diff --git a/lux-jvm/project.clj b/lux-jvm/project.clj
index fa6ce9dff..38e56ffdb 100644
--- a/lux-jvm/project.clj
+++ b/lux-jvm/project.clj
@@ -26,6 +26,6 @@
:manifest {"lux" ~version}
:source-paths ["source"]
- :lux {:program "program"
- :test "test/program"}
+ :lux {:program ["program" "_"]
+ :test ["test/program" "_"]}
)
diff --git a/lux-jvm/source/program.lux b/lux-jvm/source/program.lux
index 217218e2e..17fe054ef 100644
--- a/lux-jvm/source/program.lux
+++ b/lux-jvm/source/program.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except Definition)
- [program (.only program:)]
+ [program (.only program)]
["[0]" ffi (.only import)]
[abstract
[monad (.only do)]]
@@ -49,7 +49,8 @@
["/" jvm (.only)
["[1][0]" runtime (.only Anchor Definition)]
["[1][0]" host]
- ["[1][0]" program]]]]]]]]
+ ["[1][0]" program]
+ ["[1][0]" reference]]]]]]]]
["[0]" world
["[0]" file]
["[1]/[0]" environment]]]]
@@ -159,27 +160,28 @@
(-> Any (Async Any))
(async.future (at world/environment.default exit +0)))
-(def (lux_compiler it)
+(def lux_compiler
(-> Any platform.Custom)
- (as_expected it))
-
-(program: [service cli.service]
- (let [context (context.jvm (cli.target service))]
- (exec (do async.monad
- [[loader host platform] (async.future ..platform)
- _ (compositor.compiler
- ..lux_compiler
- context
- ..expander
- (analysis.bundle loader host)
- (io.io platform)
- generation.bundle
- (|>> ..extender (declaration.bundle loader))
- (/program.program /runtime.class_name)
- [Anchor (type_literal (Bytecode Any)) Definition]
- ..extender
- service
- [(packager.package context)
- (format (cli.target service) (at file.default separator) "program.jar")])]
- (..declare_success! []))
- (io.io []))))
+ (|>> as_expected))
+
+(def _
+ (program [service cli.service]
+ (let [context (context.jvm (cli.target service))]
+ (exec (do async.monad
+ [[loader host platform] (async.future ..platform)
+ _ (compositor.compiler
+ ..lux_compiler
+ context
+ ..expander
+ (analysis.bundle loader host)
+ (io.io platform)
+ generation.bundle
+ (|>> ..extender (declaration.bundle loader))
+ (/program.program /runtime.class_name) /reference.constant
+ [Anchor (type_literal (Bytecode Any)) Definition]
+ ..extender
+ service
+ [(packager.package context)
+ (format (cli.target service) (at file.default separator) "program.jar")])]
+ (..declare_success! []))
+ (io.io [])))))