aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/repository
diff options
context:
space:
mode:
authorEduardo Julian2022-07-09 14:35:38 -0400
committerEduardo Julian2022-07-09 14:35:38 -0400
commit7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 (patch)
treebd1c865dea0902790f3e462cec4f9bc8d8ae428f /stdlib/source/program/aedifex/repository
parentfc2737b5226eda69c12bc593e83e22ed54e4d3af (diff)
First-class programs instead of having a "lux program" extension.
Diffstat (limited to 'stdlib/source/program/aedifex/repository')
-rw-r--r--stdlib/source/program/aedifex/repository/identity.lux2
-rw-r--r--stdlib/source/program/aedifex/repository/local.lux24
2 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/program/aedifex/repository/identity.lux b/stdlib/source/program/aedifex/repository/identity.lux
index 348a3fc46..eaca93cdb 100644
--- a/stdlib/source/program/aedifex/repository/identity.lux
+++ b/stdlib/source/program/aedifex/repository/identity.lux
@@ -6,7 +6,7 @@
[equivalence (.only Equivalence)]]
[data
["[0]" product]
- ["[0]" text
+ ["[0]" text (.only)
["%" \\format (.only format)]
[encoding
["[0]" utf8]]]]]])
diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux
index 39a5c8396..af9b502aa 100644
--- a/stdlib/source/program/aedifex/repository/local.lux
+++ b/stdlib/source/program/aedifex/repository/local.lux
@@ -11,7 +11,7 @@
["[0]" text (.only)
["%" \\format (.only format)]]]
[world
- [program (.only Program)]
+ [environment (.only Environment)]
["[0]" file]
[net
["[0]" uri (.only URI)]]]]]
@@ -20,37 +20,37 @@
["[1][0]" local]
["[1][0]" metadata]]])
-(def .public (root program fs)
- (-> (Program Async) (file.System Async) file.Path)
+(def .public (root environment fs)
+ (-> (Environment Async) (file.System Async) file.Path)
(let [/ (at fs separator)]
(|> ///local.repository
(text.replaced uri.separator /)
- (format (at program home) /))))
+ (format (at environment home) /))))
(def (path /)
(-> Text (-> URI file.Path))
(text.replaced uri.separator /))
-(def (absolute_path program fs)
- (-> (Program Async) (file.System Async) (-> URI file.Path))
+(def (absolute_path environment fs)
+ (-> (Environment Async) (file.System Async) (-> URI file.Path))
(let [/ (at fs separator)]
(|>> ///metadata.local_uri
(..path /)
- (format (..root program fs) /))))
+ (format (..root environment fs) /))))
-(def .public (repository program fs)
- (-> (Program Async) (file.System Async) (//.Repository Async))
+(def .public (repository environment fs)
+ (-> (Environment Async) (file.System Async) (//.Repository Async))
(implementation
(def description
- (..root program fs))
+ (..root environment fs))
(def download
- (|>> (..absolute_path program fs)
+ (|>> (..absolute_path environment fs)
(at fs read)))
(def (upload uri content)
(do [! async.monad]
- [.let [absolute_path (..absolute_path program fs uri)]
+ [.let [absolute_path (..absolute_path environment fs uri)]
? (at fs file? absolute_path)
_ (is (Async (Try Any))
(if ?