aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/format.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-12-25 09:22:38 -0400
committerEduardo Julian2020-12-25 09:22:38 -0400
commit4ca397765805eda5ddee393901ed3a02001a960a (patch)
tree2ab184a1a4e244f3a69e86c8a7bb3ad49c22b4a3 /stdlib/source/program/aedifex/format.lux
parentd29e091e98dabb8dfcf816899ada480ecbf7e357 (diff)
Replaced kebab-case with snake_case for naming convention.
Diffstat (limited to 'stdlib/source/program/aedifex/format.lux')
-rw-r--r--stdlib/source/program/aedifex/format.lux50
1 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/program/aedifex/format.lux b/stdlib/source/program/aedifex/format.lux
index b5d6571be..d42333fd9 100644
--- a/stdlib/source/program/aedifex/format.lux
+++ b/stdlib/source/program/aedifex/format.lux
@@ -57,14 +57,14 @@
(Format Aggregate)
(|>> dictionary.entries
(list\map (function (_ [key value])
- [(code.local-tag key) value]))
+ [(code.local_tag key) value]))
code.record))
(def: empty
Aggregate
(dictionary.new text.hash))
-(def: (on-maybe field value format aggregate)
+(def: (on_maybe field value format aggregate)
(All [a]
(-> Text (Maybe a) (Format a) Aggregate Aggregate))
(case value
@@ -74,7 +74,7 @@
(#.Some value)
(dictionary.put field (format value) aggregate)))
-(def: (on-list field value format aggregate)
+(def: (on_list field value format aggregate)
(All [a]
(-> Text (List a) (Format a) Aggregate Aggregate))
(case value
@@ -84,12 +84,12 @@
value
(dictionary.put field (` [(~+ (list\map format value))]) aggregate)))
-(def: (on-set field value format aggregate)
+(def: (on_set field value format aggregate)
(All [a]
(-> Text (Set a) (Format a) Aggregate Aggregate))
- (..on-list field (set.to-list value) format aggregate))
+ (..on_list field (set.to_list value) format aggregate))
-(def: (on-dictionary field value key-format value-format aggregate)
+(def: (on_dictionary field value key_format value_format aggregate)
(All [k v]
(-> Text (Dictionary k v) (Format k) (Format v) Aggregate Aggregate))
(if (dictionary.empty? value)
@@ -98,20 +98,20 @@
(|> value
dictionary.entries
(list\map (function (_ [key value])
- [(key-format key) (value-format value)]))
+ [(key_format key) (value_format value)]))
code.record)
aggregate)))
(def: (info value)
(Format /.Info)
(|> ..empty
- (..on-maybe "url" (get@ #/.url value) code.text)
- (..on-maybe "scm" (get@ #/.scm value) code.text)
- (..on-maybe "description" (get@ #/.description value) code.text)
- (..on-list "licenses" (get@ #/.licenses value) ..license)
- (..on-maybe "organization" (get@ #/.organization value) ..organization)
- (..on-list "developers" (get@ #/.developers value) ..developer)
- (..on-list "contributors" (get@ #/.contributors value) ..contributor)
+ (..on_maybe "url" (get@ #/.url value) code.text)
+ (..on_maybe "scm" (get@ #/.scm value) code.text)
+ (..on_maybe "description" (get@ #/.description value) code.text)
+ (..on_list "licenses" (get@ #/.licenses value) ..license)
+ (..on_maybe "organization" (get@ #/.organization value) ..organization)
+ (..on_list "developers" (get@ #/.developers value) ..developer)
+ (..on_list "contributors" (get@ #/.contributors value) ..contributor)
..aggregate))
(def: (artifact' [group name version])
@@ -126,7 +126,7 @@
(def: (dependency [artifact type])
(Format Dependency)
- (if (text\= //artifact/type.lux-library type)
+ (if (text\= //artifact/type.lux_library type)
(` [(~+ (..artifact' artifact))])
(` [(~+ (..artifact' artifact))
(~ (code.text type))])))
@@ -134,16 +134,16 @@
(def: #export (profile value)
(Format /.Profile)
(|> ..empty
- (..on-list "parents" (get@ #/.parents value) code.text)
- (..on-maybe "identity" (get@ #/.identity value) ..artifact)
- (..on-maybe "info" (get@ #/.info value) ..info)
- (..on-set "repositories" (get@ #/.repositories value) code.text)
- (..on-set "dependencies" (get@ #/.dependencies value) ..dependency)
- (..on-set "sources" (get@ #/.sources value) code.text)
- (..on-maybe "target" (get@ #/.target value) code.text)
- (..on-maybe "program" (get@ #/.program value) code.text)
- (..on-maybe "test" (get@ #/.test value) code.text)
- (..on-dictionary "deploy-repositories" (get@ #/.deploy-repositories value) code.text code.text)
+ (..on_list "parents" (get@ #/.parents value) code.text)
+ (..on_maybe "identity" (get@ #/.identity value) ..artifact)
+ (..on_maybe "info" (get@ #/.info value) ..info)
+ (..on_set "repositories" (get@ #/.repositories value) code.text)
+ (..on_set "dependencies" (get@ #/.dependencies value) ..dependency)
+ (..on_set "sources" (get@ #/.sources value) code.text)
+ (..on_maybe "target" (get@ #/.target value) code.text)
+ (..on_maybe "program" (get@ #/.program value) code.text)
+ (..on_maybe "test" (get@ #/.test value) code.text)
+ (..on_dictionary "deploy-repositories" (get@ #/.deploy_repositories value) code.text code.text)
..aggregate))
(def: #export project