aboutsummaryrefslogtreecommitdiff
path: root/lux-python
diff options
context:
space:
mode:
Diffstat (limited to 'lux-python')
-rw-r--r--lux-python/source/program.lux25
1 files changed, 15 insertions, 10 deletions
diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux
index bd2e74788..e93019e32 100644
--- a/lux-python/source/program.lux
+++ b/lux-python/source/program.lux
@@ -37,7 +37,7 @@
["@" target
["_" python]]
[tool
- [compiler
+ ["[0]" compiler
["[0]" phase {"+" Operation Phase} ("[1]#[0]" monad)]
[reference
[variable {"+" Register}]]
@@ -529,13 +529,13 @@
($_ _.then
(_.import "sys")
(_.when (_.= (_.string "__main__") (_.var "__name__"))
- (_.statement (_.apply/2 program
- (|> (_.var "sys") (_.the "argv")
- ... The first entry in the list will be the program.py file itself
- ... so, it must be removed so only the program's arguments are left.
- (_.slice_from (_.int +1))
- runtime.lux::program_args)
- _.none)))))
+ (_.statement (_.apply/* (list (|> (_.var "sys") (_.the "argv")
+ ... The first entry in the list will be the program.py file itself
+ ... so, it must be removed so only the program's arguments are left.
+ (_.slice_from (_.int +1))
+ runtime.lux::program_args)
+ _.none)
+ program)))))
(def: (declare_success! _)
(-> Any (Async Any))
@@ -551,14 +551,19 @@
(; (|> (_.__import__/1 (_.unicode "sys"))
(_.do "setrecursionlimit" (list max_recursion))))
(_.def @program (list) body)
- (; (_.apply/* @program (list)))
+ (; (_.apply/* (list) @program))
))))
+(def: (lux_compiler it)
+ (-> Any compiler.Custom)
+ (undefined))
+
(program: [service cli.service]
(let [extension ".py"]
(exec
(do async.monad
- [_ (/.compiler (context.python (cli.target service))
+ [_ (/.compiler ..lux_compiler
+ (context.python (cli.target service))
..expander
analysis.bundle
..platform