... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. ... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. (.require [library [lux (.except) [abstract [equivalence (.only Equivalence)] [monad (.only do)]] [control ["<>" parser]] [data ["[0]" text ["%" \\format] ["<[1]>" \\parser]] [format ["[0]" xml (.only XML) ["<[1]>" \\parser (.only Parser)]]]] [math [number ["[0]" nat]]]]]) (type .public Build Nat) (def .public equivalence (Equivalence Build) nat.equivalence) (def tag xml.Tag ["" "buildNumber"]) (def .public format (-> Build XML) (|>> %.nat {xml.#Text} list {xml.#Node ..tag xml.attributes})) (def .public parser (Parser Build) (<| (.node ..tag) (.then (<>.codec nat.decimal (.many .decimal))) .text))