aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/artifact/snapshot/version
diff options
context:
space:
mode:
authorEduardo Julian2021-07-13 02:41:45 -0400
committerEduardo Julian2021-07-13 02:41:45 -0400
commit2431e767a09894c2f685911ba7f1ba0b7de2a165 (patch)
treef5c79fb04af80b8418e9de0a5e668f29403dd7fd /stdlib/source/program/aedifex/artifact/snapshot/version
parent86bcfadb774618defaa27bbb9361a93d288fb985 (diff)
Improved the XML parsing library.
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/aedifex/artifact/snapshot/version.lux11
1 files changed, 3 insertions, 8 deletions
diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version.lux b/stdlib/source/program/aedifex/artifact/snapshot/version.lux
index 905523bd0..806d2b261 100644
--- a/stdlib/source/program/aedifex/artifact/snapshot/version.lux
+++ b/stdlib/source/program/aedifex/artifact/snapshot/version.lux
@@ -50,19 +50,14 @@
(..format_text ..<value> value)
(..format_text ..<updated> (///time.format updated)))))
-(def: (sub tag parser)
- (All [a] (-> xml.Tag (Parser a) (Parser a)))
- (do <>.monad
- [_ (<xml>.node tag)]
- (<xml>.children parser)))
-
(def: (text tag)
(-> xml.Tag (Parser Text))
- (..sub tag <xml>.text))
+ (<| (<xml>.node tag)
+ <xml>.text))
(def: #export parser
(Parser Version)
- (<| (..sub ..<snapshot_version>)
+ (<| (<xml>.node ..<snapshot_version>)
($_ <>.and
(<xml>.somewhere (..text ..<extension>))
(<xml>.somewhere (..text ..<value>))