From 772f621c19408c711c1e587668a52a8cfeeea418 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 12 Aug 2022 22:26:57 -0400 Subject: Fixes for Aedifex tests. --- stdlib/source/program/aedifex/format.lux | 39 ++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'stdlib/source/program/aedifex/format.lux') diff --git a/stdlib/source/program/aedifex/format.lux b/stdlib/source/program/aedifex/format.lux index 594b91014..771bcc9de 100644 --- a/stdlib/source/program/aedifex/format.lux +++ b/stdlib/source/program/aedifex/format.lux @@ -28,31 +28,31 @@ (def (license [name url type]) (Format /.License) - (`' [#name (, (code.text name)) - #url (, (code.text url)) - #type (, (when type - {/.#Repo} - (' "repo") + (`' ["name" (, (code.text name)) + "url" (, (code.text url)) + "type" (, (when type + {/.#Repo} + (' "repo") - {/.#Manual} - (' "manual")))])) + {/.#Manual} + (' "manual")))])) (def (organization [name url]) (Format /.Organization) - (`' [#name (, (code.text name)) - #url (, (code.text url))])) + (`' ["name" (, (code.text name)) + "url" (, (code.text url))])) (def (developer [name url organization]) (Format /.Developer) (when organization {.#None} - (`' [#name (, (code.text name)) - #url (, (code.text url))]) + (`' ["name" (, (code.text name)) + "url" (, (code.text url))]) {.#Some value} - (`' [#name (, (code.text name)) - #url (, (code.text url)) - #organization (, (..organization value))]))) + (`' ["name" (, (code.text name)) + "url" (, (code.text url)) + "organization" (, (..organization value))]))) (def contributor (Format /.Contributor) @@ -156,10 +156,18 @@ (` [(, (code.symbol definition)) (,* (list#each code.text parameters))])) +(def configuration + (Format /.Configuration) + (|>> (list#each (function (_ [setting value]) + (list (code.text setting) + (code.text value)))) + list#conjoint + code.tuple)) + (def .public lux_compiler_label "lux") -(def (profile value) +(def .public (profile value) (Format /.Profile) (`` (|> ..empty (..on_list "parents" (the /.#parents value) code.text) @@ -174,6 +182,7 @@ (..on_maybe "program" (the /.#program value) code.symbol) (..on_maybe "test" (the /.#test value) code.symbol) (..on_dictionary "deploy_repositories" (the /.#deploy_repositories value) code.text code.text) + (dictionary.has "configuration" (..configuration (the /.#configuration value))) (,, (with_template [] [(dictionary.has (template.text []) (..runtime (the value)))] -- cgit v1.2.3