From 62b3abfcc014ca1c19d62aacdd497f6a250b372c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 25 Jul 2021 03:12:17 -0400 Subject: Better syntax for "library/lux.^multi". --- stdlib/source/program/aedifex/parser.lux | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'stdlib/source/program/aedifex/parser.lux') diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux index d0dd59133..ca5fe3be3 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -83,7 +83,7 @@ (Parser /.License) (do {! <>.monad} [input (\ ! map - (dictionary.from_list text.hash) + (dictionary.of_list text.hash) (.record (<>.some (<>.and .local_tag .any))))] ($_ <>.and @@ -98,7 +98,7 @@ (Parser /.Organization) (do {! <>.monad} [input (\ ! map - (dictionary.from_list text.hash) + (dictionary.of_list text.hash) (.record (<>.some (<>.and .local_tag .any))))] ($_ <>.and @@ -109,7 +109,7 @@ (Parser /.Developer) (do {! <>.monad} [input (\ ! map - (dictionary.from_list text.hash) + (dictionary.of_list text.hash) (.record (<>.some (<>.and .local_tag .any))))] ($_ <>.and @@ -126,7 +126,7 @@ (Parser /.Info) (do {! <>.monad} [input (\ ! map - (dictionary.from_list text.hash) + (dictionary.of_list text.hash) (.record (<>.some (<>.and .local_tag .any))))] ($_ <>.and @@ -182,7 +182,7 @@ (Parser /.Profile) (do {! <>.monad} [input (\ ! map - (dictionary.from_list text.hash) + (dictionary.of_list text.hash) (.record (<>.some (<>.and .local_tag .any)))) #let [^parents (: (Parser (List /.Name)) @@ -196,20 +196,20 @@ (..singular input "info" ..info))) ^repositories (: (Parser (Set //repository.Address)) (|> (..plural input "repositories" ..repository) - (\ ! map (set.from_list text.hash)) + (\ ! map (set.of_list text.hash)) (<>.default (set.new text.hash)) (\ ! map (set.add /.default_repository)))) ^dependencies (: (Parser (Set //dependency.Dependency)) (|> (..plural input "dependencies" ..dependency) - (\ ! map (set.from_list //dependency.hash)) + (\ ! map (set.of_list //dependency.hash)) (<>.default (set.new //dependency.hash)))) ^compiler (|> ..dependency (..singular input "compiler") (<>.default /.default_compiler)) ^sources (: (Parser (Set /.Source)) (|> (..plural input "sources" ..source) - (\ ! map (set.from_list text.hash)) - (<>.default (set.from_list text.hash (list /.default_source))))) + (\ ! map (set.of_list text.hash)) + (<>.default (set.of_list text.hash (list /.default_source))))) ^target (: (Parser /.Target) (|> ..target (..singular input "target") @@ -221,7 +221,7 @@ (<>.maybe (..singular input "test" ..module))) ^deploy_repositories (: (Parser (Dictionary Text //repository.Address)) - (<| (\ ! map (dictionary.from_list text.hash)) + (<| (\ ! map (dictionary.of_list text.hash)) (<>.default (list)) (..singular input "deploy_repositories" ..deploy_repository))) ^java (|> ..runtime @@ -262,11 +262,11 @@ (Parser Project) (let [default_profile (: (Parser Project) (\ <>.monad map - (|>> [/.default] (list) (dictionary.from_list text.hash)) + (|>> [/.default] (list) (dictionary.of_list text.hash)) ..profile)) multi_profile (: (Parser Project) (\ <>.monad map - (dictionary.from_list text.hash) + (dictionary.of_list text.hash) (.record (<>.many (<>.and .text ..profile)))))] (<>.either multi_profile -- cgit v1.2.3