aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source')
-rw-r--r--new-luxc/source/program.lux29
1 files changed, 18 insertions, 11 deletions
diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux
index 23384cf17..661858e40 100644
--- a/new-luxc/source/program.lux
+++ b/new-luxc/source/program.lux
@@ -1,6 +1,6 @@
(.module:
[lux #*
- ["." host (#+ import:)]
+ ["@" host (#+ import:)]
[abstract
[monad (#+ do)]]
[control
@@ -9,7 +9,8 @@
[data
["." error (#+ Error)]
[collection
- [array (#+ Array)]]]
+ [array (#+ Array)]
+ ["." dictionary]]]
[world
["." file]]
[tool
@@ -33,7 +34,8 @@
["." runtime]
["." expression]
[procedure
- ["." common]]]]]])
+ ["." common]
+ ["." host]]]]]])
(import: #long java/lang/reflect/Method
(invoke [java/lang/Object (Array java/lang/Object)] #try java/lang/Object))
@@ -46,13 +48,13 @@
(def: _object-class
(java/lang/Class java/lang/Object)
- (host.class-for java/lang/Object))
+ (@.class-for java/lang/Object))
(def: _apply-args
(Array (java/lang/Class java/lang/Object))
- (|> (host.array (java/lang/Class java/lang/Object) 2)
- (host.array-write 0 _object-class)
- (host.array-write 1 _object-class)))
+ (|> (@.array (java/lang/Class java/lang/Object) 2)
+ (@.array-write 0 _object-class)
+ (@.array-write 1 _object-class)))
(def: (expander macro inputs lux)
Expander
@@ -64,9 +66,9 @@
(:coerce (Error (Error [Lux (List Code)]))
(java/lang/reflect/Method::invoke
(:coerce java/lang/Object macro)
- (|> (host.array java/lang/Object 2)
- (host.array-write 0 (:coerce java/lang/Object inputs))
- (host.array-write 1 (:coerce java/lang/Object lux)))
+ (|> (@.array java/lang/Object 2)
+ (@.array-write 0 (:coerce java/lang/Object inputs))
+ (@.array-write 1 (:coerce java/lang/Object lux)))
apply-method))))
(def: jvm
@@ -145,4 +147,9 @@
$i.RETURN))))]))
(program: [{service /cli.service}]
- (/.compiler ..expander ..jvm common.bundle ..program service))
+ (/.compiler ..expander
+ ..jvm
+ (dictionary.merge common.bundle
+ host.bundle)
+ ..program
+ service))