diff options
Diffstat (limited to 'stdlib/source/program')
-rw-r--r-- | stdlib/source/program/compositor.lux | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index 63c398bf9..95ad2c771 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -24,7 +24,8 @@ ["." list ("#@." functor fold)]]] [world ["." file (#+ File Path)] - ["." console]] + ## ["." console] + ] [tool [compiler ["." phase] @@ -73,21 +74,33 @@ (def: (package! monad file-system [packager package] static archive context) (All [!] (-> (Monad !) (file.System !) [Packager Path] Static Archive Context (! (Try Any)))) - (do (try.with monad) - [#let [packager (:share [!] {(Monad !) monad} {(Packager !) packager})] - content (packager monad file-system static archive context) - package (:share [!] - {(Monad !) - monad} - {(! (Try (File !))) - (:assume (file.get-file monad file-system package))})] - (!.use (:: (:share [!] - {(Monad !) - monad} - {(File !) - (:assume package)}) - over-write) - [content]))) + (for {@.old + (do (try.with monad) + [#let [packager (:share [!] {(Monad !) monad} {(Packager !) packager})] + content (packager monad file-system static archive context) + package (:share [!] + {(Monad !) + monad} + {(! (Try (File !))) + (:assume (file.get-file monad file-system package))})] + (!.use (:: (:share [!] + {(Monad !) + monad} + {(File !) + (:assume package)}) + over-write) + [content]))} + ## TODO: Fix whatever type-checker bug is forcing me into this compromise... + (:assume + (: (Promise (Try Any)) + (let [monad (:coerce (Monad Promise) monad) + file-system (:coerce (file.System Promise) monad) + packager (:coerce (Packager Promise) packager)] + (do (try.with monad) + [content (packager monad file-system static archive context) + package (: (Promise (Try (File Promise))) + (file.get-file monad file-system package))] + (!.use (:: (: (File Promise) package) over-write) [content]))))))) (with-expansions [<parameters> (as-is anchor expression artifact)] (def: #export (compiler static |