aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/compositor
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/compositor
parentd29e091e98dabb8dfcf816899ada480ecbf7e357 (diff)
Replaced kebab-case with snake_case for naming convention.
Diffstat (limited to 'stdlib/source/program/compositor')
-rw-r--r--stdlib/source/program/compositor/export.lux28
-rw-r--r--stdlib/source/program/compositor/import.lux14
2 files changed, 21 insertions, 21 deletions
diff --git a/stdlib/source/program/compositor/export.lux b/stdlib/source/program/compositor/export.lux
index b649f333b..2c764aff9 100644
--- a/stdlib/source/program/compositor/export.lux
+++ b/stdlib/source/program/compositor/export.lux
@@ -32,11 +32,11 @@
(def: file
"library.tar")
-(def: no-ownership
+(def: no_ownership
tar.Ownership
(let [commons (: tar.Owner
{#tar.name tar.anonymous
- #tar.id tar.no-id})]
+ #tar.id tar.no_id})]
{#tar.user commons
#tar.group commons}))
@@ -46,21 +46,21 @@
[files (io.enumerate system sources)]
(|> (dictionary.entries files)
(monad.map try.monad
- (function (_ [path source-code])
+ (function (_ [path source_code])
(do try.monad
[path (|> path
- (text.replace-all (\ system separator) .module-separator)
+ (text.replace_all (\ system separator) .module_separator)
tar.path)
- source-code (tar.content source-code)]
+ source_code (tar.content source_code)]
(wrap (#tar.Normal [path
- (instant.from-millis +0)
+ (instant.from_millis +0)
($_ tar.and
- tar.read-by-owner tar.write-by-owner
- tar.read-by-group tar.write-by-group
- tar.read-by-other)
- ..no-ownership
- source-code])))))
- (\ try.monad map row.from-list)
+ tar.read_by_owner tar.write_by_owner
+ tar.read_by_group tar.write_by_group
+ tar.read_by_other)
+ ..no_ownership
+ source_code])))))
+ (\ try.monad map row.from_list)
(\ promise.monad wrap))))
(def: #export (export system [sources target])
@@ -68,8 +68,8 @@
(do (try.with promise.monad)
[tar (..library system sources)
package (: (Promise (Try (file.File Promise)))
- (file.get-file promise.monad system
+ (file.get_file promise.monad system
(format target (\ system separator) ..file)))]
(|> tar
(binary.run tar.writer)
- (!.use (\ package over-write)))))
+ (!.use (\ package over_write)))))
diff --git a/stdlib/source/program/compositor/import.lux b/stdlib/source/program/compositor/import.lux
index 54227c7f3..7b4a9262e 100644
--- a/stdlib/source/program/compositor/import.lux
+++ b/stdlib/source/program/compositor/import.lux
@@ -33,7 +33,7 @@
(def: Action
(type (All [a] (Promise (Try a)))))
-(exception: #export useless-tar-entry)
+(exception: #export useless_tar_entry)
(exception: #export (duplicate {library Library} {module Module})
(exception.report
@@ -43,7 +43,7 @@
(type: #export Import
(Dictionary Path Binary))
-(def: (import-library system library import)
+(def: (import_library system library import)
(-> (file.System Promise) Library Import (Action Import))
(do (try.with promise.monad)
[file (: (Action (File Promise))
@@ -55,8 +55,8 @@
(monad.fold ! (function (_ entry import)
(case entry
(#tar.Normal [path instant mode ownership content])
- (let [path (tar.from-path path)]
- (case (dictionary.try-put path (tar.data content) import)
+ (let [path (tar.from_path path)]
+ (case (dictionary.try_put path (tar.data content) import)
(#try.Success import)
(wrap import)
@@ -64,14 +64,14 @@
(exception.throw ..duplicate [library path])))
_
- (exception.throw ..useless-tar-entry [])))
+ (exception.throw ..useless_tar_entry [])))
import
- (row.to-list tar))))))
+ (row.to_list tar))))))
(def: #export (import system libraries)
(-> (file.System Promise) (List Library) (Action Import))
(monad.fold (: (Monad Action)
(try.with promise.monad))
- (..import-library system)
+ (..import_library system)
(dictionary.new text.hash)
libraries))