aboutsummaryrefslogtreecommitdiff
path: root/lux-lua
diff options
context:
space:
mode:
authorEduardo Julian2022-07-09 14:35:38 -0400
committerEduardo Julian2022-07-09 14:35:38 -0400
commit7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 (patch)
treebd1c865dea0902790f3e462cec4f9bc8d8ae428f /lux-lua
parentfc2737b5226eda69c12bc593e83e22ed54e4d3af (diff)
First-class programs instead of having a "lux program" extension.
Diffstat (limited to 'lux-lua')
-rw-r--r--lux-lua/source/program.lux73
1 files changed, 37 insertions, 36 deletions
diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux
index 824b2b33b..150feec52 100644
--- a/lux-lua/source/program.lux
+++ b/lux-lua/source/program.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except)
- [program (.only program:)]
+ [program (.only program)]
["[0]" ffi]
[abstract
["[0]" monad (.only do)]]
@@ -881,38 +881,39 @@
(-> Any platform.Custom)
(undefined))
-(`` (program: [service cli.service]
- (let [context (context.lua (cli.target service))]
- (do io.monad
- [(,, (for @.old [baggage platform]
- @.jvm [baggage platform]
- @.lua platform))
- ..platform]
- (exec (do async.monad
- [_ (/.compiler ..lux_compiler
- context
- (for @.old (..expander ..to_host baggage)
- @.jvm (..expander ..to_host baggage)
- @.lua ..expander)
- analysis.bundle
- (io.io platform)
- generation.bundle
- (function.constant extension/bundle.empty)
- ..program
- [(type_literal [Register _.Label])
- _.Expression
- _.Statement]
- (for @.old (..extender baggage)
- @.jvm (..extender baggage)
- @.lua ..extender)
- service
- [(packager.package (_.manual "")
- _.code
- _.then
- (|>>))
- (format (cli.target service)
- (at file.default separator)
- "program"
- (the context.#artifact_extension context))])]
- (..declare_success! []))
- (io.io []))))))
+(`` (def _
+ (program [service cli.service]
+ (let [context (context.lua (cli.target service))]
+ (do io.monad
+ [(,, (for @.old [baggage platform]
+ @.jvm [baggage platform]
+ @.lua platform))
+ ..platform]
+ (exec (do async.monad
+ [_ (/.compiler ..lux_compiler
+ context
+ (for @.old (..expander ..to_host baggage)
+ @.jvm (..expander ..to_host baggage)
+ @.lua ..expander)
+ analysis.bundle
+ (io.io platform)
+ generation.bundle
+ (function.constant extension/bundle.empty)
+ ..program
+ [(type_literal [Register _.Label])
+ _.Expression
+ _.Statement]
+ (for @.old (..extender baggage)
+ @.jvm (..extender baggage)
+ @.lua ..extender)
+ service
+ [(packager.package (_.manual "")
+ _.code
+ _.then
+ (|>>))
+ (format (cli.target service)
+ (at file.default separator)
+ "program"
+ (the context.#artifact_extension context))])]
+ (..declare_success! []))
+ (io.io [])))))))