diff options
author | Eduardo Julian | 2022-07-09 14:35:38 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-07-09 14:35:38 -0400 |
commit | 7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 (patch) | |
tree | bd1c865dea0902790f3e462cec4f9bc8d8ae428f /lux-js/source/program.lux | |
parent | fc2737b5226eda69c12bc593e83e22ed54e4d3af (diff) |
First-class programs instead of having a "lux program" extension.
Diffstat (limited to '')
-rw-r--r-- | lux-js/source/program.lux | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index 1df4d4803..c692a41a0 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - [program (.only program:)] + [program (.only program)] ["[0]" ffi (.only import)] ["[0]" debug] [abstract @@ -707,26 +707,27 @@ (-> Any platform.Custom) (undefined)) -(program: [service cli.service] - (let [context (context.js (cli.target service))] - (exec - (do async.monad - [platform (async.future ..platform) - _ (/.compiler ..lux_compiler - context - ..expander - analysis.bundle - (io.io platform) - generation.bundle - (function.constant extension/bundle.empty) - ..program - [(And Register Text) _.Expression _.Statement] - ..extender - service - [(packager.package _.use_strict _.code _.then ..scope) - (format (cli.target service) - (at (the platform.#file_system platform) separator) - "program" - (the context.#artifact_extension context))])] - (..declare_success! [])) - (io.io [])))) +(def _ + (program [service cli.service] + (let [context (context.js (cli.target service))] + (exec + (do async.monad + [platform (async.future ..platform) + _ (/.compiler ..lux_compiler + context + ..expander + analysis.bundle + (io.io platform) + generation.bundle + (function.constant extension/bundle.empty) + ..program + [(And Register Text) _.Expression _.Statement] + ..extender + service + [(packager.package _.use_strict _.code _.then ..scope) + (format (cli.target service) + (at (the platform.#file_system platform) separator) + "program" + (the context.#artifact_extension context))])] + (..declare_success! [])) + (io.io []))))) |