From 2e5852abb1ac0ae5abdd8709238aca447f62520e Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 7 Nov 2020 00:29:40 -0400 Subject: Pure-Lux implementation for biggest and smallest Frac values. --- stdlib/source/program/aedifex.lux | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'stdlib/source/program/aedifex.lux') diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux index d4c9036f3..a9b4c9514 100644 --- a/stdlib/source/program/aedifex.lux +++ b/stdlib/source/program/aedifex.lux @@ -4,15 +4,16 @@ [monad (#+ do)]] [control [pipe (#+ do>)] - ["." try (#+ Try)] ["." io (#+ IO)] + ["." try (#+ Try)] + ["." exception (#+ exception:)] [parser ["." cli (#+ program:)] ["" code]] [security ["!" capability]] [concurrency - ["." promise (#+ Promise)]]] + ["." promise (#+ Promise) ("#@." monad)]]] [data [binary (#+ Binary)] ["." text @@ -21,7 +22,8 @@ [format ["." xml]] [collection - ["." set]]] + ["." set] + ["." dictionary (#+ Dictionary)]]] [tool [compiler [language @@ -38,6 +40,7 @@ ["#." pom] ["#." cli] ["#." cache] + ["#." repository (#+ Address)] ["#." dependency #_ ["#" resolution]] ["#." command @@ -70,6 +73,14 @@ (log! (format "Could not resolve dependencies:" text.new-line error)))))) +(exception: (cannot-find-repository {repository Text} + {options (Dictionary Text Address)}) + (exception.report + ["Repository" (%.text repository)] + ["Options" (exception.enumerate (function (_ [name repo]) + (format (%.text name) " := " (%.text repo))) + (dictionary.entries options))])) + (program: [{[profile operation] /cli.command}] (do {! io.monad} [?profile (/input.read io.monad file.default profile)] @@ -92,10 +103,23 @@ (exec (/command/install.do! (file.async file.default) profile) (wrap [])) - (#/cli.Deploy repository user password) - (exec (/command/deploy.do! repository user password profile) - (wrap [])) + (#/cli.Deploy repository identity) + (exec (case [(get@ #/.identity profile) + (dictionary.get repository (get@ #/.deploy-repositories profile))] + [(#.Some artifact) (#.Some repository)] + (/command/deploy.do! (/repository.async (/repository.default repository)) + (file.async file.default) + identity + artifact + profile) + [#.None _] + (promise@wrap (exception.throw /.no-identity [])) + + [_ #.None] + (promise@wrap (exception.throw ..cannot-find-repository [repository (get@ #/.deploy-repositories profile)]))) + (wrap [])) + (#/cli.Compilation compilation) (case compilation #/cli.Build (exec (/command/build.do! profile) -- cgit v1.2.3