diff options
author | Eduardo Julian | 2021-08-24 05:23:45 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-24 05:23:45 -0400 |
commit | 36303d6cb2ce3ab9e36d045b9516c997bd461862 (patch) | |
tree | b9d2f1495143054d61d9af129f36833624db9dac /stdlib/source/program/aedifex/parser.lux | |
parent | ec1f31b5a1492d5e0ab260397291d4449483bbd9 (diff) |
Outsourced the syntax for labelled type definitions to macros.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/parser.lux | 24 |
1 files changed, 12 insertions, 12 deletions
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) (<code>.record (<>.some (<>.and <code>.local_tag <code>.any))))] @@ -97,7 +97,7 @@ (def: organization (Parser /.Organization) (do {! <>.monad} - [input (\ ! map + [input (\ ! each (dictionary.of_list text.hash) (<code>.record (<>.some (<>.and <code>.local_tag <code>.any))))] @@ -108,7 +108,7 @@ (def: developer (Parser /.Developer) (do {! <>.monad} - [input (\ ! map + [input (\ ! each (dictionary.of_list text.hash) (<code>.record (<>.some (<>.and <code>.local_tag <code>.any))))] @@ -125,7 +125,7 @@ (def: info (Parser /.Info) (do {! <>.monad} - [input (\ ! map + [input (\ ! each (dictionary.of_list text.hash) (<code>.record (<>.some (<>.and <code>.local_tag <code>.any))))] @@ -181,7 +181,7 @@ (def: profile (Parser /.Profile) (do {! <>.monad} - [input (\ ! map + [input (\ ! each (dictionary.of_list text.hash) (<code>.record (<>.some (<>.and <code>.local_tag <code>.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) (<code>.record (<>.many (<>.and <code>.text ..profile)))))] |