aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/runtime.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-07-12 22:51:25 -0400
committerEduardo Julian2021-07-12 22:51:25 -0400
commit86bcfadb774618defaa27bbb9361a93d288fb985 (patch)
tree48c8422b872ec21d60810a88e47f38c9583f6333 /stdlib/source/program/aedifex/runtime.lux
parent86df87512966e8038d70624ab654262ce14a915c (diff)
A bit more clarity for Licentia licenses.
Diffstat (limited to 'stdlib/source/program/aedifex/runtime.lux')
-rw-r--r--stdlib/source/program/aedifex/runtime.lux48
1 files changed, 35 insertions, 13 deletions
diff --git a/stdlib/source/program/aedifex/runtime.lux b/stdlib/source/program/aedifex/runtime.lux
index e3f5a4e92..571a9fc43 100644
--- a/stdlib/source/program/aedifex/runtime.lux
+++ b/stdlib/source/program/aedifex/runtime.lux
@@ -1,22 +1,44 @@
(.module:
- [lux #*
+ [lux (#- for)
+ [abstract
+ [equivalence (#+ Equivalence)]]
[data
- [text
- ["%" format (#+ format)]]]
+ ["." product]
+ ["." text
+ ["%" format (#+ format)]]
+ [collection
+ ["." list ("#\." monoid)]]]
[macro
["." template]]
[world
- [file (#+ Path)]
- [shell (#+ Command)]]])
+ ["." file]]])
+
+(type: #export Runtime
+ {#program Text
+ #parameters (List Text)})
+
+(def: #export equivalence
+ (Equivalence Runtime)
+ (product.equivalence
+ text.equivalence
+ (list.equivalence text.equivalence)))
(template [<name> <command> <parameters>]
- [(def: #export (<name> path)
- (-> Path [Text (List Text)])
- (`` (format [<command> (list (~~ (template.splice <parameters>)) path)])))]
+ [(def: #export <name>
+ Runtime
+ {#program <command>
+ #parameters (`` (list (~~ (template.splice <parameters>))))})]
- [java "java" ["-jar"]]
- [node "node" ["--stack_size=8192"]]
- [python "python3" []]
- [lua "lua" []]
- [ruby "RUBY_THREAD_VM_STACK_SIZE=15700000 ruby" []]
+ [default_java "java" ["-jar"]]
+ [default_js "node" ["--stack_size=8192"]]
+ [default_python "python3" []]
+ [default_lua "lua" []]
+ [default_ruby "RUBY_THREAD_VM_STACK_SIZE=15700000 ruby" []]
)
+
+(def: #export (for runtime path)
+ (-> Runtime file.Path Runtime)
+ (update@ #parameters
+ (function (_ parameters)
+ (list\compose parameters (list path)))
+ runtime))