From f3e869d0246e956399ec31a074c6c6299ff73602 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 8 Jul 2021 23:59:00 -0400 Subject: Made sure the "phase" parameter of extensions is always usable (even across language boundaries) --- stdlib/source/program/aedifex/parser.lux | 68 ++++++++++++++++---------------- 1 file changed, 34 insertions(+), 34 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 60e491dac..835b03729 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -4,7 +4,7 @@ [monad (#+ do)]] [control ["<>" parser - ["" code (#+ Parser)]]] + ["<.>" code (#+ Parser)]]] [data ["." text] [collection @@ -37,25 +37,25 @@ (def: (singular input tag parser) (All [a] (-> (Dictionary Text Code) Text (Parser a) (Parser a))) - (.local (..as_input (dictionary.get tag input)) - parser)) + (.local (..as_input (dictionary.get tag input)) + parser)) (def: (plural input tag parser) (All [a] (-> (Dictionary Text Code) Text (Parser a) (Parser (List a)))) - (.local (..as_input (dictionary.get tag input)) - (.tuple (<>.some parser)))) + (.local (..as_input (dictionary.get tag input)) + (.tuple (<>.some parser)))) (def: group (Parser //artifact.Group) - .text) + .text) (def: name (Parser //artifact.Name) - .text) + .text) (def: version (Parser //artifact.Version) - .text) + .text) (def: artifact' (Parser //artifact.Artifact) @@ -63,11 +63,11 @@ (def: artifact (Parser //artifact.Artifact) - (.tuple ..artifact')) + (.tuple ..artifact')) (def: url (Parser URL) - .text) + .text) (def: scm (Parser /.SCM) @@ -75,30 +75,30 @@ (def: description (Parser Text) - .text) + .text) (def: license (Parser /.License) (do {! <>.monad} [input (\ ! map (dictionary.from_list text.hash) - (.record (<>.some (<>.and .local_tag - .any))))] + (.record (<>.some (<>.and .local_tag + .any))))] ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url) (<>.default #/.Repo (..singular input "type" - (<>.or (.this! (' #repo)) - (.this! (' #manual)))))))) + (<>.or (.this! (' #repo)) + (.this! (' #manual)))))))) (def: organization (Parser /.Organization) (do {! <>.monad} [input (\ ! map (dictionary.from_list text.hash) - (.record (<>.some (<>.and .local_tag - .any))))] + (.record (<>.some (<>.and .local_tag + .any))))] ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url)))) @@ -108,8 +108,8 @@ (do {! <>.monad} [input (\ ! map (dictionary.from_list text.hash) - (.record (<>.some (<>.and .local_tag - .any))))] + (.record (<>.some (<>.and .local_tag + .any))))] ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url) @@ -125,8 +125,8 @@ (do {! <>.monad} [input (\ ! map (dictionary.from_list text.hash) - (.record (<>.some (<>.and .local_tag - .any))))] + (.record (<>.some (<>.and .local_tag + .any))))] ($_ <>.and (<>.maybe (..singular input "url" ..url)) (<>.maybe (..singular input "scm" ..scm)) @@ -143,11 +143,11 @@ (def: type (Parser //artifact/type.Type) - .text) + .text) (def: dependency (Parser //dependency.Dependency) - (.tuple + (.tuple ($_ <>.and ..artifact' (<>.default //artifact/type.lux_library ..type) @@ -155,32 +155,32 @@ (def: source (Parser /.Source) - .text) + .text) (def: target (Parser /.Target) - .text) + .text) (def: module (Parser Module) - .text) + .text) (def: deploy_repository (Parser (List [Text //repository.Address])) - (.record (<>.some - (<>.and .text - ..repository)))) + (.record (<>.some + (<>.and .text + ..repository)))) (def: profile (Parser /.Profile) (do {! <>.monad} [input (\ ! map (dictionary.from_list text.hash) - (.record (<>.some (<>.and .local_tag - .any)))) + (.record (<>.some (<>.and .local_tag + .any)))) #let [^parents (: (Parser (List /.Name)) (<>.default (list) - (..plural input "parents" .text))) + (..plural input "parents" .text))) ^identity (: (Parser (Maybe Artifact)) (<>.maybe (..singular input "identity" ..artifact))) @@ -236,7 +236,7 @@ multi_profile (: (Parser Project) (\ <>.monad map (dictionary.from_list text.hash) - (.record (<>.many (<>.and .text - ..profile)))))] + (.record (<>.many (<>.and .text + ..profile)))))] (<>.either multi_profile default_profile))) -- cgit v1.2.3