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/dependency.lux | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'stdlib/source/program/aedifex/dependency.lux') diff --git a/stdlib/source/program/aedifex/dependency.lux b/stdlib/source/program/aedifex/dependency.lux index 2086a4d06..3128bb3f3 100644 --- a/stdlib/source/program/aedifex/dependency.lux +++ b/stdlib/source/program/aedifex/dependency.lux @@ -1,5 +1,5 @@ (.module: - [lux (#- Name Type) + [lux (#- Name) ["." host (#+ import:)] [abstract [monad (#+ do)] @@ -30,19 +30,16 @@ ["." uri]]]] ["." // #_ ["#." extension] - ["#." artifact (#+ Artifact)] - ["#." hash]]) + ["#." hash] + ["#." artifact (#+ Artifact) + ["#/." type]]]) (type: #export Repository URL) -## https://maven.apache.org/ref/3.6.3/maven-core/artifact-handlers.html -(type: #export Type - Text) - (type: #export Dependency {#artifact Artifact - #type ..Type}) + #type //artifact/type.Type}) (def: #export equivalence (Equivalence Dependency) @@ -58,16 +55,6 @@ text.hash )) -(template [ ] - [(def: #export - Type - )] - - ["tar" lux-library] - ["jar" jvm-library] - ["pom" pom] - ) - (import: java/lang/String) (import: java/lang/AutoCloseable @@ -200,7 +187,7 @@ #//artifact.version version} #type (|> properties (dictionary.get ["" "type"]) - (maybe.default ..lux-library))}))))) + (maybe.default //artifact/type.lux-library))}))))) (def: parse-dependencies (Parser (List Dependency)) -- cgit v1.2.3