aboutsummaryrefslogtreecommitdiff
path: root/lux-lua/source
diff options
context:
space:
mode:
authorEduardo Julian2021-07-17 22:48:54 -0400
committerEduardo Julian2021-07-17 22:48:54 -0400
commit442d1557b879a8a4bd76f441f72a17bfb71cf05f (patch)
tree7726138a487b3d64081c2cfdf99a564cf2b6ed7b /lux-lua/source
parent2c99b4515447315d76a8dc203a2dbcafc09506ea (diff)
Now allowing compilers to generate custom-named outputs.
Diffstat (limited to 'lux-lua/source')
-rw-r--r--lux-lua/source/program.lux18
1 files changed, 10 insertions, 8 deletions
diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux
index 6c7719220..0bb73d348 100644
--- a/lux-lua/source/program.lux
+++ b/lux-lua/source/program.lux
@@ -561,8 +561,9 @@
(def: execute! run!)
- (def: (define! context input)
- (let [global (reference.artifact context)
+ (def: (define! context custom input)
+ (let [global (maybe.default (reference.artifact context)
+ custom)
@global (_.var global)]
(do try.monad
[#let [definition (_.set (list @global) input)]
@@ -573,10 +574,10 @@
(def: (ingest context content)
(|> content (\ utf8.codec decode) try.assume (:as _.Statement)))
- (def: (re_learn context content)
+ (def: (re_learn context custom content)
(run! content))
- (def: (re_load context content)
+ (def: (re_load context custom content)
(do try.monad
[_ (run! content)]
(run! (_.return (_.var (reference.artifact context))))))))]))))
@@ -598,8 +599,9 @@
(def: execute! run!)
- (def: (define! context input)
- (let [global (reference.artifact context)
+ (def: (define! context custom input)
+ (let [global (maybe.default (reference.artifact context)
+ custom)
@global (_.var global)]
(do try.monad
[#let [definition (_.set (list @global) input)]
@@ -610,10 +612,10 @@
(def: (ingest context content)
(|> content (\ utf8.codec decode) try.assume (:as _.Statement)))
- (def: (re_learn context content)
+ (def: (re_learn context custom content)
(run! content))
- (def: (re_load context content)
+ (def: (re_load context custom content)
(do try.monad
[_ (run! content)]
(run! (_.return (_.var (reference.artifact context))))))))))))})