(.module: [lux (#- Name) [abstract ["." equivalence (#+ Equivalence)]] [control ["<>" parser ["." cli (#+ Parser)]]] [data ["." text]]] [// [repository (#+ Identity)] ["/" profile (#+ Name)]]) (type: #export Compilation #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 Command #Version #Clean #POM #Dependencies #Install (#Deploy Text Identity) (#Compilation Compilation) (#Auto Compilation)) (def: #export equivalence (Equivalence Command) ($_ equivalence.sum ## #Version ..any-equivalence ## #Clean ..any-equivalence ## #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: command' (Parser Command) ($_ <>.or (cli.this "version") (cli.this "clean") (cli.this "pom") (cli.this "deps") (cli.this "install") (<>.after (cli.this "deploy") (<>.and cli.any (<>.and cli.any cli.any))) ..compilation (<>.after (cli.this "auto") ..compilation) )) (def: #export command (Parser [Name Command]) ($_ <>.either (<>.after (cli.this "with") ($_ <>.and cli.any ..command')) (\ <>.monad map (|>> [/.default]) ..command') ))