From 13323c55a4d34ddb74b67fab684d4431f9624dd1 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 29 Nov 2021 17:53:01 -0400 Subject: New packaging for Ruby programs. --- stdlib/source/program/compositor.lux | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'stdlib/source/program/compositor.lux') diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index 8e0077b4a..54fc903ad 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -5,7 +5,7 @@ ["@" target] ["[0]" debug] [abstract - [monad {"+" do}]] + ["[0]" monad {"+" do}]] [control ["[0]" io {"+" IO io}] ["[0]" try {"+" Try}] @@ -87,7 +87,17 @@ (-> (file.System Async) (Dictionary file.Path Binary) [Packager file.Path] Static Archive Context (Async (Try Any))) (case (packager host_dependencies archive context) {try.#Success content} - (# fs write content package) + (case content + {.#Left content} + (# fs write content package) + + {.#Right content} + (do [! (try.with async.monad)] + [_ (# fs make_directory package) + _ (monad.each ! (function (_ [name content]) + (# fs write content (file.rooted fs package name))) + content)] + (in []))) {try.#Failure error} (# async.monad in {try.#Failure error}))) -- cgit v1.2.3