From 38c2eb5d39838e415a8c1f51b79099086b391a22 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 30 May 2021 19:33:34 -0400 Subject: Giving up on Kawa for now... --- lux-scheme/commands.md | 2 ++ lux-scheme/source/program.lux | 29 +++++++---------------------- 2 files changed, 9 insertions(+), 22 deletions(-) (limited to 'lux-scheme') diff --git a/lux-scheme/commands.md b/lux-scheme/commands.md index 7c915200c..11d6e2945 100644 --- a/lux-scheme/commands.md +++ b/lux-scheme/commands.md @@ -26,5 +26,7 @@ cd ~/lux/stdlib/ \ && time java -jar ~/lux/lux-scheme/target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux clear && time kawa ~/lux/stdlib/target/program.scm + +clear && time kawa ~/lux/stdlib/target/program/1.scm ``` diff --git a/lux-scheme/source/program.lux b/lux-scheme/source/program.lux index 24d26945d..d71daa6e7 100644 --- a/lux-scheme/source/program.lux +++ b/lux-scheme/source/program.lux @@ -25,6 +25,8 @@ [number (#+ hex) ["n" nat] ["." i64]]] + [time + ["." instant]] ["." world #_ ["." file] ["#/." program]] @@ -57,7 +59,7 @@ ["." platform (#+ Platform)]] [meta ["." packager #_ - ["#" script]]]]]] + ["#" scheme]]]]]] [program ["/" compositor ["#." cli] @@ -442,24 +444,11 @@ (-> Any (Promise Any)) (promise.future (\ world/program.default exit +0))) -(def: (then pre post) - (-> _.Expression _.Expression _.Expression) - (_.manual (format (_.code pre) - text.new_line - (_.code post)))) - -(def: (scope body) - (-> _.Expression _.Expression) - (let [@program (_.var "lux_program")] - ($_ ..then - (_.define_function @program [(list) #.None] body) - (_.apply/* (list) @program) - ))) - (`` (program: [{service /cli.service}] (let [extension ".scm"] (do io.monad - [platform ..platform] + [platform ..platform + now instant.now] (exec (do promise.monad [_ (/.compiler {#/static.host @.scheme #/static.host_module_extension extension @@ -474,13 +463,9 @@ [_.Var _.Expression _.Expression] ..extender service - [(packager.package (_.manual "") - _.code - ..then - ..scope) + [(packager.package now) (format (/cli.target service) (\ file.default separator) - "program" - extension)])] + "program.tar")])] (..declare_success! [])) (io.io [])))))) -- cgit v1.2.3