From 28c724857d76afdc40b5b036f415cc151eb66263 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 2 Dec 2020 20:37:13 -0400 Subject: Replaced "contains?" function with "key?" function. --- stdlib/source/program/aedifex.lux | 5 +++++ stdlib/source/program/aedifex/cli.lux | 4 ++++ stdlib/source/program/aedifex/command/version.lux | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 stdlib/source/program/aedifex/command/version.lux (limited to 'stdlib/source/program') diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux index d876b5665..2478b4016 100644 --- a/stdlib/source/program/aedifex.lux +++ b/stdlib/source/program/aedifex.lux @@ -48,6 +48,7 @@ ["#." dependency #_ ["#" resolution (#+ Resolution)]] ["#." command (#+ Command) + ["#/." version] ["#/." clean] ["#/." pom] ["#/." install] @@ -87,6 +88,10 @@ (case ?profile (#try.Success profile) (case operation + #/cli.Version + (exec (/command/version.do! profile) + (wrap [])) + #/cli.Clean (exec (/command/clean.do! (file.async file.default) profile) (wrap [])) diff --git a/stdlib/source/program/aedifex/cli.lux b/stdlib/source/program/aedifex/cli.lux index d52bf4df6..7af7405a9 100644 --- a/stdlib/source/program/aedifex/cli.lux +++ b/stdlib/source/program/aedifex/cli.lux @@ -32,6 +32,7 @@ (cli.this "test"))) (type: #export Command + #Version #Clean #POM #Dependencies @@ -43,6 +44,8 @@ (def: #export equivalence (Equivalence Command) ($_ equivalence.sum + ## #Version + ..any-equivalence ## #Clean ..any-equivalence ## #POM @@ -64,6 +67,7 @@ (def: command' (Parser Command) ($_ <>.or + (cli.this "version") (cli.this "clean") (cli.this "pom") (cli.this "deps") diff --git a/stdlib/source/program/aedifex/command/version.lux b/stdlib/source/program/aedifex/command/version.lux new file mode 100644 index 000000000..8f26a7fb7 --- /dev/null +++ b/stdlib/source/program/aedifex/command/version.lux @@ -0,0 +1,16 @@ +(.module: + [lux #* + [tool + [compiler + ["." version] + ["." language #_ + ["#/." lux #_ + ["#" version]]]]]] + ["." /// #_ + [command (#+ Command)] + ["#." action]]) + +(def: #export (do! profile) + (Command Any) + (\ ///action.monad wrap + (log! (version.format language/lux.version)))) -- cgit v1.2.3