From 8c3a1afab9efeb86e2f53d743551fc689fbad257 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 12 Jun 2022 13:33:48 -0400 Subject: De-sigil-ification: suffix : [Part 4] --- stdlib/source/program/aedifex/profile.lux | 118 +++++++++++++++--------------- 1 file changed, 59 insertions(+), 59 deletions(-) (limited to 'stdlib/source/program/aedifex/profile.lux') diff --git a/stdlib/source/program/aedifex/profile.lux b/stdlib/source/program/aedifex/profile.lux index 6420d69ac..90e5f3d8d 100644 --- a/stdlib/source/program/aedifex/profile.lux +++ b/stdlib/source/program/aedifex/profile.lux @@ -49,19 +49,19 @@ {#Repo} {#Manual})) -(implementation: distribution_equivalence +(def: distribution_equivalence (Equivalence Distribution) + (implementation + (def: (= reference subject) + (case [reference subject] + (^.with_template [] + [[{} {}] + true]) + ([#Repo] + [#Manual]) - (def: (= reference subject) - (case [reference subject] - (^.with_template [] - [[{} {}] - true]) - ([#Repo] - [#Manual]) - - _ - false))) + _ + false)))) (type: .public License [Text @@ -226,55 +226,55 @@ ... #ruby runtime.equivalence)) -(implementation: .public monoid +(def: .public monoid (Monoid Profile) + (implementation + (def: identity + [#parents (list) + #identity {.#None} + #info {.#None} + #repositories (set.empty text.hash) + #dependencies (set.empty dependency.hash) + #lux ..default_lux + #compilers (list) + #sources (set.empty text.hash) + #target ..default_target + #program {.#None} + #test {.#None} + #deploy_repositories (dictionary.empty text.hash) + #configuration plist.empty + #java runtime.default_java + #js runtime.default_js + #python runtime.default_python + #lua runtime.default_lua + #ruby runtime.default_ruby]) - (def: identity - [#parents (list) - #identity {.#None} - #info {.#None} - #repositories (set.empty text.hash) - #dependencies (set.empty dependency.hash) - #lux ..default_lux - #compilers (list) - #sources (set.empty text.hash) - #target ..default_target - #program {.#None} - #test {.#None} - #deploy_repositories (dictionary.empty text.hash) - #configuration plist.empty - #java runtime.default_java - #js runtime.default_js - #python runtime.default_python - #lua runtime.default_lua - #ruby runtime.default_ruby]) - - (def: (composite override baseline) - (template.let [(!runtime ) - [(if (runtime#= (the override)) - (the baseline) - (the override))]] - [#parents (list#composite (the #parents baseline) (the #parents override)) - #identity (maybe#composite (the #identity override) (the #identity baseline)) - #info (maybe#composite (the #info override) (the #info baseline)) - #repositories (set.union (the #repositories baseline) (the #repositories override)) - #dependencies (set.union (the #dependencies baseline) (the #dependencies override)) - #lux (if (dependency#= ..default_lux (the #lux override)) - (the #lux baseline) - (the #lux override)) - #compilers (list#composite (the #compilers baseline) (the #compilers override)) - #sources (set.union (the #sources baseline) (the #sources override)) - #target (if (text#= ..default_target (the #target baseline)) - (the #target override) - (the #target baseline)) - #program (maybe#composite (the #program override) (the #program baseline)) - #test (maybe#composite (the #test override) (the #test baseline)) - #deploy_repositories (dictionary.composite (the #deploy_repositories override) (the #deploy_repositories baseline)) - #configuration (plist#composite (the #configuration override) (the #configuration baseline)) - #java (!runtime #java runtime.default_java) - #js (!runtime #js runtime.default_js) - #python (!runtime #python runtime.default_python) - #lua (!runtime #lua runtime.default_lua) - #ruby (!runtime #ruby runtime.default_ruby)]))) + (def: (composite override baseline) + (template.let [(!runtime ) + [(if (runtime#= (the override)) + (the baseline) + (the override))]] + [#parents (list#composite (the #parents baseline) (the #parents override)) + #identity (maybe#composite (the #identity override) (the #identity baseline)) + #info (maybe#composite (the #info override) (the #info baseline)) + #repositories (set.union (the #repositories baseline) (the #repositories override)) + #dependencies (set.union (the #dependencies baseline) (the #dependencies override)) + #lux (if (dependency#= ..default_lux (the #lux override)) + (the #lux baseline) + (the #lux override)) + #compilers (list#composite (the #compilers baseline) (the #compilers override)) + #sources (set.union (the #sources baseline) (the #sources override)) + #target (if (text#= ..default_target (the #target baseline)) + (the #target override) + (the #target baseline)) + #program (maybe#composite (the #program override) (the #program baseline)) + #test (maybe#composite (the #test override) (the #test baseline)) + #deploy_repositories (dictionary.composite (the #deploy_repositories override) (the #deploy_repositories baseline)) + #configuration (plist#composite (the #configuration override) (the #configuration baseline)) + #java (!runtime #java runtime.default_java) + #js (!runtime #js runtime.default_js) + #python (!runtime #python runtime.default_python) + #lua (!runtime #lua runtime.default_lua) + #ruby (!runtime #ruby runtime.default_ruby)])))) (exception: .public no_identity) -- cgit v1.2.3