diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/runtime.lux | 48 |
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)) |