From 17629d66062b88b040a2397032f6c08361a5f3a7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 12 Aug 2021 03:12:42 -0400 Subject: Improved binding syntax for "syntax:". --- stdlib/source/program/aedifex/format.lux | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 c0c9db2d1..82b15f84d 100644 --- a/stdlib/source/program/aedifex/format.lux +++ b/stdlib/source/program/aedifex/format.lux @@ -75,7 +75,7 @@ aggregate (#.Some value) - (dictionary.put field (format value) aggregate))) + (dictionary.has field (format value) aggregate))) (def: (on_list field value format aggregate) (All [a] @@ -85,7 +85,7 @@ aggregate value - (dictionary.put field (` [(~+ (list\map format value))]) aggregate))) + (dictionary.has field (` [(~+ (list\map format value))]) aggregate))) (def: (on_set field value format aggregate) (All [a] @@ -97,7 +97,7 @@ (-> Text (Dictionary k v) (Format k) (Format v) Aggregate Aggregate)) (if (dictionary.empty? value) aggregate - (dictionary.put field + (dictionary.has field (|> value dictionary.entries (list\map (function (_ [key value]) @@ -147,14 +147,14 @@ (..on_maybe "info" (get@ #/.info value) ..info) (..on_set "repositories" (get@ #/.repositories value) code.text) (..on_set "dependencies" (get@ #/.dependencies value) ..dependency) - (dictionary.put "compiler" (..dependency (get@ #/.compiler value))) + (dictionary.has "compiler" (..dependency (get@ #/.compiler value))) (..on_set "sources" (get@ #/.sources value) code.text) - (dictionary.put "target" (code.text (get@ #/.target value))) + (dictionary.has "target" (code.text (get@ #/.target value))) (..on_maybe "program" (get@ #/.program value) code.text) (..on_maybe "test" (get@ #/.test value) code.text) (..on_dictionary "deploy_repositories" (get@ #/.deploy_repositories value) code.text code.text) (~~ (template [] - [(dictionary.put (template.text []) (..runtime (get@ value)))] + [(dictionary.has (template.text []) (..runtime (get@ value)))] [#/.java] [#/.js] -- cgit v1.2.3