From 5dbf134346424602b0104d1f749c1a9eac6f21af Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 12 Jan 2021 17:31:48 -0400 Subject: Compiler now shows suggestions when encountering unknown definitions. --- stdlib/source/program/aedifex/artifact/build.lux | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 stdlib/source/program/aedifex/artifact/build.lux (limited to 'stdlib/source/program/aedifex/artifact') diff --git a/stdlib/source/program/aedifex/artifact/build.lux b/stdlib/source/program/aedifex/artifact/build.lux new file mode 100644 index 000000000..d9a8b729e --- /dev/null +++ b/stdlib/source/program/aedifex/artifact/build.lux @@ -0,0 +1,43 @@ +(.module: + [lux #* + [abstract + [equivalence (#+ Equivalence)] + [monad (#+ do)]] + [control + ["<>" parser + ["<.>" xml (#+ Parser)] + ["<.>" text]]] + [data + [text + ["%" format]] + [format + ["." xml (#+ XML)]]] + [math + [number + ["." nat]]]]) + +(type: #export Build + Nat) + +(def: #export equivalence + (Equivalence Build) + nat.equivalence) + +(def: tag + xml.Tag + ["" "buildNumber"]) + +(def: #export format + (-> Build XML) + (|>> %.nat + #xml.Text + list + (#xml.Node ..tag xml.attributes))) + +(def: #export parser + (Parser Build) + (do <>.monad + [_ (.node ..tag)] + (.embed (<>.codec nat.decimal + (.many .decimal)) + (.children .text)))) -- cgit v1.2.3