From 7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 9 Jul 2022 14:35:38 -0400 Subject: First-class programs instead of having a "lux program" extension. --- lux-php/source/program.lux | 59 +++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 29 deletions(-) (limited to 'lux-php') diff --git a/lux-php/source/program.lux b/lux-php/source/program.lux index dbaded2ce..d3d191a8f 100644 --- a/lux-php/source/program.lux +++ b/lux-php/source/program.lux @@ -1,6 +1,6 @@ (.require [lux (.except) - [program (.only program:)] + [program (.only program)] ["[0]" ffi] ["[0]" debug] [abstract @@ -558,31 +558,32 @@ (-> Any (Promise Any)) (promise.future (at world/program.default exit +0))) -(`` (program: [service /cli.service] - (let [extension ".php"] - (do io.monad - [platform ..platform] - (exec (do promise.monad - [_ (/.compiler [/static.#host @.php - /static.#host_module_extension extension - /static.#target (/cli.target service) - /static.#artifact_extension extension] - ..expander - analysis.bundle - (io.io platform) - generation.bundle - extension/bundle.empty - ..program - [(& Nat _.Label) _.Expression _.Statement] - ..extender - service - [(packager.package (_.manual ">)) - (format (/cli.target service) - (at file.default separator) - "program" - extension)])] - (..declare_success! [])) - (io.io [])))))) +(`` (def _ + (program [service /cli.service] + (let [extension ".php"] + (do io.monad + [platform ..platform] + (exec (do promise.monad + [_ (/.compiler [/static.#host @.php + /static.#host_module_extension extension + /static.#target (/cli.target service) + /static.#artifact_extension extension] + ..expander + analysis.bundle + (io.io platform) + generation.bundle + extension/bundle.empty + ..program + [(& Nat _.Label) _.Expression _.Statement] + ..extender + service + [(packager.package (_.manual ">)) + (format (/cli.target service) + (at file.default separator) + "program" + extension)])] + (..declare_success! [])) + (io.io []))))))) -- cgit v1.2.3