(.module: [lux #* [abstract [monad (#+ do)]] [control ["." try (#+ Try)] [security ["!" capability]] [concurrency ["." promise (#+ Promise) ("#\." monad)]]] [data ["." text ["%" format (#+ format)] ["." encoding]] [format ["." xml]]] [world ["." file (#+ Path File)]]] ["." /// #_ [command (#+ Command)] ["#." action (#+ Action)] ["#." pom]]) (def: #export (do! fs profile) (-> (file.System Promise) (Command Path)) (do ///action.monad [pom (promise\wrap (///pom.write profile)) file (: (Promise (Try (File Promise))) (file.get-file promise.monad fs ///pom.file)) outcome (|> pom (:: xml.codec encode) encoding.to-utf8 (!.use (:: file over-write))) #let [_ (log! "Successfully wrote POM file!")]] (wrap ///pom.file)))