From 9e2f1e76f2c8df01ed7687d934c3210fcf676bd6 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 16 Jun 2022 00:48:19 -0400 Subject: De-sigil-ification: suffix : [Part 13] --- stdlib/source/program/aedifex/format.lux | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 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 6316e6287..cd10c675f 100644 --- a/stdlib/source/program/aedifex/format.lux +++ b/stdlib/source/program/aedifex/format.lux @@ -26,7 +26,7 @@ (type: .public (Format a) (-> a Code)) -(def: (license [name url type]) +(def (license [name url type]) (Format /.License) (`' [#name (~ (code.text name)) #url (~ (code.text url)) @@ -37,12 +37,12 @@ {/.#Manual} (' "manual")))])) -(def: (organization [name url]) +(def (organization [name url]) (Format /.Organization) (`' [#name (~ (code.text name)) #url (~ (code.text url))])) -(def: (developer [name url organization]) +(def (developer [name url organization]) (Format /.Developer) (case organization {.#None} @@ -54,14 +54,14 @@ #url (~ (code.text url)) #organization (~ (..organization value))]))) -(def: contributor +(def contributor (Format /.Contributor) ..developer) (type: Aggregate (Dictionary Text Code)) -(def: aggregate +(def aggregate (Format Aggregate) (|>> dictionary.entries (list#each (function (_ [key value]) @@ -69,11 +69,11 @@ list#conjoint code.tuple)) -(def: empty +(def empty Aggregate (dictionary.empty text.hash)) -(def: (on_maybe field value format aggregate) +(def (on_maybe field value format aggregate) (All (_ a) (-> Text (Maybe a) (Format a) Aggregate Aggregate)) (case value @@ -83,7 +83,7 @@ {.#Some value} (dictionary.has field (format value) aggregate))) -(def: (on_list field value format aggregate) +(def (on_list field value format aggregate) (All (_ a) (-> Text (List a) (Format a) Aggregate Aggregate)) (case value @@ -93,12 +93,12 @@ value (dictionary.has field (` [(~+ (list#each format value))]) aggregate))) -(def: (on_set field value format aggregate) +(def (on_set field value format aggregate) (All (_ a) (-> Text (Set a) (Format a) Aggregate Aggregate)) (..on_list field (set.list value) format aggregate)) -(def: (on_dictionary field value key_format value_format aggregate) +(def (on_dictionary field value key_format value_format aggregate) (All (_ k v) (-> Text (Dictionary k v) (Format k) (Format v) Aggregate Aggregate)) (if (dictionary.empty? value) @@ -112,7 +112,7 @@ code.tuple) aggregate))) -(def: (info value) +(def (info value) (Format /.Info) (|> ..empty (..on_maybe "name" (the /.#name value) code.text) @@ -125,24 +125,24 @@ (..on_list "contributors" (the /.#contributors value) ..contributor) ..aggregate)) -(def: (artifact' [group name version]) +(def (artifact' [group name version]) (-> Artifact (List Code)) (list (code.text group) (code.text name) (code.text version))) -(def: (artifact value) +(def (artifact value) (Format Artifact) (` [(~+ (..artifact' value))])) -(def: (dependency [artifact type]) +(def (dependency [artifact type]) (Format Dependency) (if (text#= //artifact/type.lux_library type) (` [(~+ (..artifact' artifact))]) (` [(~+ (..artifact' artifact)) (~ (code.text type))]))) -(def: (runtime [environment program parameters]) +(def (runtime [environment program parameters]) (Format Runtime) (` [(~+ (list#each (function (_ [var value]) (` [(~ (code.text var)) @@ -151,15 +151,15 @@ (~ (code.text program)) (~+ (list#each code.text parameters))])) -(def: (compiler [definition parameters]) +(def (compiler [definition parameters]) (Format Compiler) (` [(~ (code.symbol definition)) (~+ (list#each code.text parameters))])) -(def: .public lux_compiler_label +(def .public lux_compiler_label "lux") -(def: (profile value) +(def (profile value) (Format /.Profile) (`` (|> ..empty (..on_list "parents" (the /.#parents value) code.text) @@ -184,7 +184,7 @@ [/.#ruby])) ..aggregate))) -(def: .public project +(def .public project (Format Project) (|>> dictionary.entries (list#each (function (_ [key value]) -- cgit v1.2.3