aboutsummaryrefslogtreecommitdiff
path: root/lux-ruby/source
diff options
context:
space:
mode:
authorEduardo Julian2022-07-26 18:08:04 -0400
committerEduardo Julian2022-07-26 18:08:04 -0400
commitfeacd79496ae9c76492d5a12d30b78724b642654 (patch)
treea85708d1bfe43a98ba62b7f8589dcc95a71f86f5 /lux-ruby/source
parentdec796a9838e39148c007f3f3d360964d7cb68de (diff)
Made inlined functions into first-class macros.
Diffstat (limited to 'lux-ruby/source')
-rw-r--r--lux-ruby/source/program.lux28
1 files changed, 15 insertions, 13 deletions
diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux
index df8ed9b66..324d4cefc 100644
--- a/lux-ruby/source/program.lux
+++ b/lux-ruby/source/program.lux
@@ -22,20 +22,17 @@
[collection
["[0]" array (.only Array)]
["[0]" list (.use "[1]#[0]" functor)]]]
- [macro
- ["^" pattern]
- ["[0]" template]]
[math
[number (.only hex)
["n" nat]
["i" int]
["[0]" i64]]]
- ["[0]" world
- ["[0]" file]
- ["[1]/[0]" program]]
- ["@" target (.only)
- ["_" ruby]]
[meta
+ ["@" target (.only)
+ ["_" ruby]]
+ [macro
+ ["^" pattern]
+ ["[0]" template]]
["[0]" compiler
["[0]" phase (.only Operation Phase) (.use "[1]#[0]" monad)]
[reference
@@ -57,7 +54,8 @@
[generation
["[0]" reference]
["[0]" ruby (.only)
- ["[0]" runtime]]]]]]
+ ["[0]" runtime]
+ ["[1]/[0]" reference]]]]]]
[default
["[0]" platform (.only Platform)]]
[meta
@@ -65,7 +63,10 @@
["[0]" context]
["[0]" cli]
["[0]" packager
- ["[1]" ruby]]]]]]]
+ ["[1]" ruby]]]]]
+ ["[0]" world
+ ["[0]" file]
+ ["[1]/[0]" environment]]]]
[program
["/" compositor]])
@@ -966,7 +967,7 @@
platform.#phase_wrapper ..phase_wrapper
platform.#write (|>> _.code (at utf8.codec encoded))])))
-(def (program context program)
+(def (lux_program context program)
(Program _.Expression _.Statement)
(let [normal_runtime? (_.do "const_defined?"
(list (_.string (_.code _.command_line_arguments)))
@@ -981,7 +982,7 @@
(def (declare_success! _)
(-> Any (Async Any))
- (async.future (at world/program.default exit +0)))
+ (async.future (at world/environment.default exit +0)))
(def (lux_compiler it)
(-> Any platform.Custom)
@@ -998,7 +999,8 @@
..platform
generation.bundle
(function.constant extension/bundle.empty)
- ..program
+ ..lux_program
+ (reference.constant ruby/reference.system)
[Register _.Expression _.Statement]
..extender
service