From 00d5ccbc043960037f644d4ff09b6a46fd0093d0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 12 Oct 2020 20:22:31 -0400 Subject: Type-checking macros via the Macro' type from the standard library. --- stdlib/source/program/aedifex/command/build.lux | 7 ++++--- stdlib/source/program/aedifex/command/deploy.lux | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'stdlib/source/program/aedifex/command') diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index eb7842e45..2c4b26aed 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -25,9 +25,10 @@ ["#." action] ["#." command (#+ Command)] ["#." local] - ["#." artifact (#+ Group Name Artifact)] ["#." dependency (#+ Dependency Resolution)] - ["#." shell]]) + ["#." shell] + ["#." artifact (#+ Group Name Artifact) + ["#/." type]]]) (type: Finder (-> Resolution (Maybe Dependency))) @@ -86,7 +87,7 @@ (def: libraries (-> Resolution (List Path)) (|>> dictionary.keys - (list.filter (|>> (get@ #///dependency.type) (text@= ///dependency.lux-library))) + (list.filter (|>> (get@ #///dependency.type) (text@= ///artifact/type.lux-library))) (list@map (|>> (get@ #///dependency.artifact) (///local.path file.system))))) (import: java/lang/String) diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux index 1081322b4..a4b076733 100644 --- a/stdlib/source/program/aedifex/command/deploy.lux +++ b/stdlib/source/program/aedifex/command/deploy.lux @@ -30,7 +30,9 @@ ["#." command (#+ Command)] ["#." dependency] ["#." pom] - ["#." hash]]) + ["#." hash] + ["#." artifact + ["#/." type]]]) (exception: #export (cannot-find-repository {repository Text} {options (Dictionary Text ///dependency.Repository)}) @@ -51,7 +53,7 @@ (promise@wrap (exception.throw ..cannot-find-repository [repository (get@ #/.deploy-repositories profile)])) [(#.Some identity) (#.Some repository)] - (let [deploy! (: (-> ///dependency.Type Binary (Action Any)) + (let [deploy! (: (-> ///artifact/type.Type Binary (Action Any)) (function (_ type content) (promise.future (//.upload repository @@ -65,8 +67,8 @@ (export.library (file.async file.system) (set.to-list (get@ #/.sources profile)))) pom (promise@wrap (///pom.project profile)) - _ (deploy! ///dependency.pom (|> pom (:: xml.codec encode) encoding.to-utf8)) - _ (deploy! ///dependency.lux-library library) + _ (deploy! ///artifact/type.pom (|> pom (:: xml.codec encode) encoding.to-utf8)) + _ (deploy! ///artifact/type.lux-library library) _ (deploy! "sha1" (///hash.sha1 library)) _ (deploy! "md5" (///hash.md5 library))] (wrap []))))) -- cgit v1.2.3