aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex')
-rw-r--r--stdlib/source/program/aedifex/parser.lux24
1 files changed, 8 insertions, 16 deletions
diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux
index 7b1447b8c..da92a59d9 100644
--- a/stdlib/source/program/aedifex/parser.lux
+++ b/stdlib/source/program/aedifex/parser.lux
@@ -4,6 +4,7 @@
[abstract
[monad {"+" do}]]
[control
+ ["[0]" maybe]
["<>" parser
["<[0]>" code {"+" Parser}]]]
[data
@@ -33,24 +34,15 @@
["[1][0]" artifact {"+" Artifact}
["[1]/[0]" type]]])
-(def: (as_input input)
- (-> (Maybe Code) (List Code))
- (case input
- {.#Some input}
- (list input)
-
- {.#None}
- (list)))
-
(def: (singular input tag parser)
(All (_ a) (-> (Dictionary Text Code) Text (Parser a) (Parser a)))
- (<code>.local (..as_input (dictionary.value tag input))
- parser))
+ (<code>.locally (maybe.list (dictionary.value tag input))
+ parser))
(def: (plural input tag parser)
(All (_ a) (-> (Dictionary Text Code) Text (Parser a) (Parser (List a))))
- (<code>.local (..as_input (dictionary.value tag input))
- (<code>.tuple (<>.some parser))))
+ (<code>.locally (maybe.list (dictionary.value tag input))
+ (<code>.tuple (<>.some parser))))
(def: group
(Parser //artifact.Group)
@@ -96,8 +88,8 @@
(..singular input "url" ..url)
(<>.else {/.#Repo}
(..singular input "type"
- (<>.or (<code>.this! (' "repo"))
- (<code>.this! (' "manual"))))))))
+ (<>.or (<code>.this (' "repo"))
+ (<code>.this (' "manual"))))))))
(def: organization
(Parser /.Organization)
@@ -164,7 +156,7 @@
(Parser Compiler)
(<code>.tuple
($_ <>.and
- <code>.global_symbol
+ <code>.global
(<>.some <code>.text)
)))