... 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 for) [abstract [monad (.only do)]] [control ["<>" parser] ["[0]" exception]] [data ["[0]" text (.use "[1]#[0]" equivalence)] [collection ["[0]" list (.use "[1]#[0]" mix)]]] ["[0]" meta (.only) ["[0]" code (.only) ["<[1]>" \\parser]] [macro [syntax (.only syntax)]] [compiler [version (.only Version)]]]]]) (def .public latest Version 00,08,00) (def .public current (syntax (_ []) (do meta.monad [it meta.version] (in (list (code.text it)))))) (exception.def .public invalid) (def .public for (syntax (_ [specializations (<>.some (<>.and .text .any)) default (<>.maybe .any)]) (do meta.monad [current meta.version] (when (list#mix (function (_ [when then] choice) (if (text#= when current) {.#Some then} choice)) default specializations) {.#Some it} (in (list it)) {.#None} (meta.failure (exception.error ..invalid []))))))