aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/meta/compiler/meta/cache.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/meta/compiler/meta/cache.lux')
-rw-r--r--stdlib/source/library/lux/meta/compiler/meta/cache.lux35
1 files changed, 15 insertions, 20 deletions
diff --git a/stdlib/source/library/lux/meta/compiler/meta/cache.lux b/stdlib/source/library/lux/meta/compiler/meta/cache.lux
index 17f74ccb8..97e0aa792 100644
--- a/stdlib/source/library/lux/meta/compiler/meta/cache.lux
+++ b/stdlib/source/library/lux/meta/compiler/meta/cache.lux
@@ -8,30 +8,25 @@
[monad (.only Monad do)]]
[control
["[0]" try (.only Try)]]
- [data
- [text
- ["%" \\format (.only format)]]]
[world
- ["[0]" file]]]]
- ["[0]" // (.only)
- ["[0]" context (.only Context)]
- [//
- ["[0]" version]]])
+ ["[0]" file]]]])
-(def .public (path fs context)
- (All (_ !) (-> (file.System !) Context file.Path))
- (let [/ (of fs separator)]
- (format (the context.#host context)
- / (version.format //.version))))
+(def .public path
+ file.Path
+ "cache")
-(def .public (enabled? fs context)
- (All (_ !) (-> (file.System !) Context (! Bit)))
- (of fs directory? (..path fs context)))
+(def .public (enabled? fs)
+ (All (_ !)
+ (-> (file.System !)
+ (! Bit)))
+ (of fs directory? ..path))
-(def .public (enable! ! fs context)
- (All (_ !) (-> (Monad !) (file.System !) Context (! (Try Any))))
+(def .public (enable! ! fs)
+ (All (_ !)
+ (-> (Monad !) (file.System !)
+ (! (Try Any))))
(do !
- [? (..enabled? fs context)]
+ [? (..enabled? fs)]
(if ?
(in {try.#Success []})
- (file.make_directories ! fs (..path fs context)))))
+ (file.make_directories ! fs ..path))))