(.require [library [lux (.except for) [abstract [monad (.only do)]] [control ["<>" parser] ["[0]" exception (.only 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,07,00) (def .public current (syntax (_ []) (do meta.monad [it meta.version] (in (list (code.text it)))))) (exception .public invalid) (def .public for (syntax (_ [specializations (<>.some (<>.and .text .any)) default (<>.maybe .any)]) (do meta.monad [current meta.version] (case (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 []))))))