From 4ca397765805eda5ddee393901ed3a02001a960a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 25 Dec 2020 09:22:38 -0400 Subject: Replaced kebab-case with snake_case for naming convention. --- stdlib/source/program/aedifex/parser.lux | 58 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 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 9fdc00f3b..8f95cc6a4 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -25,7 +25,7 @@ ["#." artifact (#+ Artifact) ["#/." type]]]) -(def: (as-input input) +(def: (as_input input) (-> (Maybe Code) (List Code)) (case input (#.Some input) @@ -36,12 +36,12 @@ (def: (singular input tag parser) (All [a] (-> (Dictionary Text Code) Text (Parser a) (Parser a))) - (.local (..as-input (dictionary.get tag input)) + (.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)) + (.local (..as_input (dictionary.get tag input)) (.tuple (<>.some parser)))) (def: group @@ -80,8 +80,8 @@ (Parser /.License) (do {! <>.monad} [input (\ ! map - (dictionary.from-list text.hash) - (.record (<>.some (<>.and .local-tag + (dictionary.from_list text.hash) + (.record (<>.some (<>.and .local_tag .any))))] ($_ <>.and (..singular input "name" ..name) @@ -95,8 +95,8 @@ (Parser /.Organization) (do {! <>.monad} [input (\ ! map - (dictionary.from-list text.hash) - (.record (<>.some (<>.and .local-tag + (dictionary.from_list text.hash) + (.record (<>.some (<>.and .local_tag .any))))] ($_ <>.and (..singular input "name" ..name) @@ -106,8 +106,8 @@ (Parser /.Developer) (do {! <>.monad} [input (\ ! map - (dictionary.from-list text.hash) - (.record (<>.some (<>.and .local-tag + (dictionary.from_list text.hash) + (.record (<>.some (<>.and .local_tag .any))))] ($_ <>.and (..singular input "name" ..name) @@ -123,8 +123,8 @@ (Parser /.Info) (do {! <>.monad} [input (\ ! map - (dictionary.from-list text.hash) - (.record (<>.some (<>.and .local-tag + (dictionary.from_list text.hash) + (.record (<>.some (<>.and .local_tag .any))))] ($_ <>.and (<>.maybe (..singular input "url" ..url)) @@ -149,7 +149,7 @@ (.tuple ($_ <>.and ..artifact' - (<>.default //artifact/type.lux-library ..type) + (<>.default //artifact/type.lux_library ..type) ))) (def: source @@ -164,7 +164,7 @@ (Parser Module) .text) -(def: deploy-repository +(def: deploy_repository (Parser (List [Text //repository.Address])) (.record (<>.some (<>.and .text @@ -174,8 +174,8 @@ (Parser /.Profile) (do {! <>.monad} [input (\ ! map - (dictionary.from-list text.hash) - (.record (<>.some (<>.and .local-tag + (dictionary.from_list text.hash) + (.record (<>.some (<>.and .local_tag .any)))) #let [^parents (: (Parser (List /.Name)) (<>.default (list) @@ -188,16 +188,16 @@ (..singular input "info" ..info))) ^repositories (: (Parser (Set //repository.Address)) (|> (..plural input "repositories" ..repository) - (\ ! map (set.from-list text.hash)) + (\ ! map (set.from_list text.hash)) (<>.default (set.new text.hash)))) ^dependencies (: (Parser (Set //dependency.Dependency)) (|> (..plural input "dependencies" ..dependency) - (\ ! map (set.from-list //dependency.hash)) + (\ ! map (set.from_list //dependency.hash)) (<>.default (set.new //dependency.hash)))) ^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.from_list text.hash)) + (<>.default (set.from_list text.hash (list /.default_source))))) ^target (: (Parser (Maybe /.Target)) (<>.maybe (..singular input "target" ..target))) @@ -207,10 +207,10 @@ ^test (: (Parser (Maybe Module)) (<>.maybe (..singular input "test" ..module))) - ^deploy-repositories (: (Parser (Dictionary Text //repository.Address)) - (<| (\ ! map (dictionary.from-list text.hash)) + ^deploy_repositories (: (Parser (Dictionary Text //repository.Address)) + (<| (\ ! map (dictionary.from_list text.hash)) (<>.default (list)) - (..singular input "deploy-repositories" ..deploy-repository)))]] + (..singular input "deploy-repositories" ..deploy_repository)))]] ($_ <>.and ^parents ^identity @@ -221,19 +221,19 @@ ^target ^program ^test - ^deploy-repositories + ^deploy_repositories ))) (def: #export project (Parser Project) - (let [default-profile (: (Parser Project) + (let [default_profile (: (Parser Project) (\ <>.monad map - (|>> [/.default] (list) (dictionary.from-list text.hash)) + (|>> [/.default] (list) (dictionary.from_list text.hash)) ..profile)) - multi-profile (: (Parser Project) + multi_profile (: (Parser Project) (\ <>.monad map - (dictionary.from-list text.hash) + (dictionary.from_list text.hash) (.record (<>.many (<>.and .text ..profile)))))] - (<>.either multi-profile - default-profile))) + (<>.either multi_profile + default_profile))) -- cgit v1.2.3