From e00e0b5f1e5fb509cf8f32424397110f524b8148 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 16 Jun 2022 02:16:07 -0400 Subject: New "parser" hierarchy. [Part 3] --- stdlib/source/program/aedifex/pom.lux | 58 +++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'stdlib/source/program/aedifex/pom.lux') diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index 0f5d3b50e..334a06f46 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -8,12 +8,12 @@ ["[0]" maybe (.open: "[1]#[0]" functor)] ["[0]" try (.only Try)] ["[0]" exception] - ["<>" parser (.only) - ["<[0]>" xml (.only Parser)]]] + ["<>" parser]] [data ["[0]" text] [format - ["_" xml (.only Tag XML)]] + ["[0]" xml (.only Tag XML) + ["<[1]>" \\parser (.only Parser)]]] [collection ["[0]" list (.open: "[1]#[0]" monoid functor mix)] ["[0]" set] @@ -48,14 +48,14 @@ (def version XML - {_.#Node ["" "modelVersion"] _.attributes - (list {_.#Text "4.0.0"})}) + {xml.#Node ["" "modelVersion"] xml.attributes + (list {xml.#Text "4.0.0"})}) (def (property tag value) (-> Text Text XML) - {_.#Node ["" tag] - _.attributes - (list {_.#Text value})}) + {xml.#Node ["" tag] + xml.attributes + (list {xml.#Text value})}) (def (artifact value) (-> Artifact (List XML)) @@ -75,36 +75,36 @@ (|> (list (..property "name" name) (..property ..url_tag url) (..distribution distribution)) - {_.#Node ["" "license"] _.attributes})) + {xml.#Node ["" "license"] xml.attributes})) (def repository (-> Address XML) (|>> (..property ..url_tag) list - {_.#Node ["" ..repository_tag] _.attributes})) + {xml.#Node ["" ..repository_tag] xml.attributes})) (def (dependency value) (-> Dependency XML) - {_.#Node ["" ..dependency_tag] - _.attributes - (list#composite (..artifact (the //dependency.#artifact value)) - (list (..property "type" (the //dependency.#type value))))}) + {xml.#Node ["" ..dependency_tag] + xml.attributes + (list#composite (..artifact (the //dependency.#artifact value)) + (list (..property "type" (the //dependency.#type value))))}) (def (group tag) (-> Text (-> (List XML) XML)) - (|>> {_.#Node ["" tag] _.attributes})) + (|>> {xml.#Node ["" tag] xml.attributes})) (def scm (-> /.SCM XML) (|>> (..property ..url_tag) list - {_.#Node ["" "scm"] _.attributes})) + {xml.#Node ["" "scm"] xml.attributes})) (def (organization [name url]) (-> /.Organization XML) (|> (list (..property "name" name) (..property ..url_tag url)) - {_.#Node ["" "organization"] _.attributes})) + {xml.#Node ["" "organization"] xml.attributes})) (def (developer_organization [name url]) (-> /.Organization (List XML)) @@ -120,7 +120,7 @@ (with_template [ ] [(def (-> XML) - (|>> ..developer' {_.#Node ["" ] _.attributes}))] + (|>> ..developer' {xml.#Node ["" ] xml.attributes}))] [developer /.Developer "developer"] [contributor /.Contributor "contributor"] @@ -144,17 +144,17 @@ (case (the /.#identity value) {.#Some identity} {try.#Success - {_.#Node ["" ..project_tag] _.attributes - (all list#composite - (list ..version) - (..artifact identity) - (|> value - (the /.#info) - (maybe#each ..info) - (maybe.else (list))) - (|> value (the /.#repositories) set.list (list#each ..repository) (..group "repositories") list) - (|> value (the /.#dependencies) set.list (list#each ..dependency) (..group ..dependencies_tag) list) - )}} + {xml.#Node ["" ..project_tag] xml.attributes + (all list#composite + (list ..version) + (..artifact identity) + (|> value + (the /.#info) + (maybe#each ..info) + (maybe.else (list))) + (|> value (the /.#repositories) set.list (list#each ..repository) (..group "repositories") list) + (|> value (the /.#dependencies) set.list (list#each ..dependency) (..group ..dependencies_tag) list) + )}} _ (exception.except /.no_identity []))) -- cgit v1.2.3