From 36303d6cb2ce3ab9e36d045b9516c997bd461862 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 24 Aug 2021 05:23:45 -0400 Subject: Outsourced the syntax for labelled type definitions to macros. --- 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 d5f4d3bb8..8ece73b51 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -82,7 +82,7 @@ (def: license (Parser /.License) (do {! <>.monad} - [input (\ ! map + [input (\ ! each (dictionary.of_list text.hash) (.record (<>.some (<>.and .local_tag .any))))] @@ -97,7 +97,7 @@ (def: organization (Parser /.Organization) (do {! <>.monad} - [input (\ ! map + [input (\ ! each (dictionary.of_list text.hash) (.record (<>.some (<>.and .local_tag .any))))] @@ -108,7 +108,7 @@ (def: developer (Parser /.Developer) (do {! <>.monad} - [input (\ ! map + [input (\ ! each (dictionary.of_list text.hash) (.record (<>.some (<>.and .local_tag .any))))] @@ -125,7 +125,7 @@ (def: info (Parser /.Info) (do {! <>.monad} - [input (\ ! map + [input (\ ! each (dictionary.of_list text.hash) (.record (<>.some (<>.and .local_tag .any))))] @@ -181,7 +181,7 @@ (def: profile (Parser /.Profile) (do {! <>.monad} - [input (\ ! map + [input (\ ! each (dictionary.of_list text.hash) (.record (<>.some (<>.and .local_tag .any)))) @@ -196,19 +196,19 @@ (..singular input "info" ..info))) ^repositories (: (Parser (Set //repository.Address)) (|> (..plural input "repositories" ..repository) - (\ ! map (set.of_list text.hash)) + (\ ! each (set.of_list text.hash)) (<>.else (set.empty text.hash)) - (\ ! map (set.has /.default_repository)))) + (\ ! each (set.has /.default_repository)))) ^dependencies (: (Parser (Set //dependency.Dependency)) (|> (..plural input "dependencies" ..dependency) - (\ ! map (set.of_list //dependency.hash)) + (\ ! each (set.of_list //dependency.hash)) (<>.else (set.empty //dependency.hash)))) ^compiler (|> ..dependency (..singular input "compiler") (<>.else /.default_compiler)) ^sources (: (Parser (Set /.Source)) (|> (..plural input "sources" ..source) - (\ ! map (set.of_list text.hash)) + (\ ! each (set.of_list text.hash)) (<>.else (set.of_list text.hash (list /.default_source))))) ^target (: (Parser /.Target) (|> ..target @@ -221,7 +221,7 @@ (<>.maybe (..singular input "test" ..module))) ^deploy_repositories (: (Parser (Dictionary Text //repository.Address)) - (<| (\ ! map (dictionary.of_list text.hash)) + (<| (\ ! each (dictionary.of_list text.hash)) (<>.else (list)) (..singular input "deploy_repositories" ..deploy_repository))) ^java (|> ..runtime @@ -261,11 +261,11 @@ (def: .public project (Parser Project) (let [default_profile (: (Parser Project) - (\ <>.monad map + (\ <>.monad each (|>> [/.default] (list) (dictionary.of_list text.hash)) ..profile)) multi_profile (: (Parser Project) - (\ <>.monad map + (\ <>.monad each (dictionary.of_list text.hash) (.record (<>.many (<>.and .text ..profile)))))] -- cgit v1.2.3