From bae39f32cddb816a6123697269c20dbf4a65ac19 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 9 Oct 2020 01:16:47 -0400 Subject: Also using BIPUSH and SIPUSH during JVM generation. --- stdlib/source/program/aedifex/cli.lux | 49 +++++++++++++++++++++++++------ stdlib/source/program/aedifex/profile.lux | 13 -------- stdlib/source/program/aedifex/project.lux | 2 +- 3 files changed, 41 insertions(+), 23 deletions(-) (limited to 'stdlib/source/program') diff --git a/stdlib/source/program/aedifex/cli.lux b/stdlib/source/program/aedifex/cli.lux index dc64dee6e..666e5a701 100644 --- a/stdlib/source/program/aedifex/cli.lux +++ b/stdlib/source/program/aedifex/cli.lux @@ -1,8 +1,12 @@ (.module: [lux (#- Name) + [abstract + ["." equivalence (#+ Equivalence)]] [control ["<>" parser - ["." cli (#+ Parser)]]]] + ["." cli (#+ Parser)]]] + [data + ["." text]]] [// [upload (#+ User Password)] ["/" profile (#+ Name)]]) @@ -11,12 +15,23 @@ #Build #Test) +(structure: any-equivalence + (Equivalence Any) + + (def: (= reference subject) + true)) + +(def: compilation-equivalence + (Equivalence Compilation) + (equivalence.sum ..any-equivalence + ..any-equivalence)) + (def: compilation (Parser Compilation) (<>.or (cli.this "build") (cli.this "test"))) -(type: #export Operation +(type: #export Command #POM #Dependencies #Install @@ -24,11 +39,27 @@ (#Compilation Compilation) (#Auto Compilation)) -(type: #export Command - [Name Operation]) +(def: #export equivalence + (Equivalence Command) + ($_ equivalence.sum + ## #POM + ..any-equivalence + ## #Dependencies + ..any-equivalence + ## #Install + ..any-equivalence + ## #Deploy + ($_ equivalence.product + text.equivalence + text.equivalence + text.equivalence) + ## #Compilation + ..compilation-equivalence + ## #Auto + ..compilation-equivalence)) -(def: operation - (Parser Operation) +(def: command' + (Parser Command) ($_ <>.or (cli.this "pom") (cli.this "deps") @@ -44,12 +75,12 @@ )) (def: #export command - (Parser Command) + (Parser [Name Command]) ($_ <>.either (<>.after (cli.this "with") ($_ <>.and cli.any - ..operation)) + ..command')) (:: <>.monad map (|>> [/.default]) - ..operation) + ..command') )) diff --git a/stdlib/source/program/aedifex/profile.lux b/stdlib/source/program/aedifex/profile.lux index 02ae69ac8..d8ebf9b18 100644 --- a/stdlib/source/program/aedifex/profile.lux +++ b/stdlib/source/program/aedifex/profile.lux @@ -151,19 +151,6 @@ #test (Maybe Module) #deploy-repositories (Dictionary Text dependency.Repository)}) -(def: #export empty - Profile - {#parents (list) - #identity #.None - #info #.None - #repositories (set.new text.hash) - #dependencies (set.new dependency.hash) - #sources (set.new text.hash) - #target #.None - #program #.None - #test #.None - #deploy-repositories (dictionary.new text.hash)}) - (def: #export equivalence (Equivalence Profile) ($_ equivalence.product diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index 2e205f722..15abd9ee1 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -20,7 +20,7 @@ (Dictionary Name Profile)) (def: #export empty - (dictionary.from-list text.hash (list [//.default //.empty]))) + (dictionary.from-list text.hash (list [//.default (:: //.monoid identity)]))) (def: #export equivalence (Equivalence Project) -- cgit v1.2.3