diff options
Diffstat (limited to 'stdlib/source/program/compositor.lux')
-rw-r--r-- | stdlib/source/program/compositor.lux | 14 |
1 files changed, 12 insertions, 2 deletions
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}))) |