aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/artifact
diff options
context:
space:
mode:
authorEduardo Julian2021-01-12 17:31:48 -0400
committerEduardo Julian2021-01-12 17:31:48 -0400
commit5dbf134346424602b0104d1f749c1a9eac6f21af (patch)
treeac77441b9fcbc66a6f9ef1e5a55ccf0b1bcc996e /stdlib/source/program/aedifex/artifact
parent8aac0c573c29d2829242d66539a9e027d03ff8ec (diff)
Compiler now shows suggestions when encountering unknown definitions.
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/aedifex/artifact/build.lux43
1 files changed, 43 insertions, 0 deletions
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
+ [_ (<xml>.node ..tag)]
+ (<text>.embed (<>.codec nat.decimal
+ (<text>.many <text>.decimal))
+ (<xml>.children <xml>.text))))