aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/world/file.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/world/file.lux')
-rw-r--r--stdlib/source/test/lux/world/file.lux46
1 files changed, 23 insertions, 23 deletions
diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux
index 872436a4f..3f8cb84f4 100644
--- a/stdlib/source/test/lux/world/file.lux
+++ b/stdlib/source/test/lux/world/file.lux
@@ -33,7 +33,7 @@
(type: Disk
(Dictionary /.Path (Either [Instant Binary] (List Text))))
-(def: (file? disk @)
+(def (file? disk @)
(-> (Atom Disk) (-> /.Path (IO Bit)))
(do io.monad
[disk (atom.read! disk)]
@@ -42,7 +42,7 @@
{.#Some {.#Left _}} true
{.#Some {.#Right _}} false))))
-(def: (directory? disk @)
+(def (directory? disk @)
(-> (Atom Disk) (-> /.Path (IO Bit)))
(do io.monad
[disk (atom.read! disk)]
@@ -51,7 +51,7 @@
{.#Some {.#Left _}} false
{.#Some {.#Right _}} true))))
-(def: (alert_parent! disk alert @)
+(def (alert_parent! disk alert @)
(-> (Atom Disk)
(-> (List /.Path) (List /.Path))
(-> /.Path (IO (Try Any))))
@@ -66,7 +66,7 @@
_
(in {try.#Failure ""}))))
-(def: (write fs disk @ it)
+(def (write fs disk @ it)
(-> (/.System Async) (Atom Disk) (-> /.Path Binary (IO (Try Any))))
(do [! io.monad]
[now instant.now
@@ -86,7 +86,7 @@
_
(in {try.#Failure ""}))))
-(def: (read disk @)
+(def (read disk @)
(-> (Atom Disk) (-> /.Path (IO (Try Binary))))
(do io.monad
[disk (atom.read! disk)]
@@ -97,7 +97,7 @@
_
{try.#Failure ""}))))
-(def: (delete fs disk @)
+(def (delete fs disk @)
(-> (/.System Async) (Atom Disk)
(-> /.Path (IO (Try Any))))
(do [! io.monad]
@@ -123,21 +123,21 @@
_
(in {try.#Failure ""}))))
-(def: (fs /)
+(def (fs /)
(-> Text (/.System IO))
(let [disk (is (Atom Disk)
(atom.atom (dictionary.empty text.hash)))
mock (/.mock /)]
(implementation
- (def: separator /)
+ (def separator /)
- (def: file? (..file? disk))
- (def: directory? (..directory? disk))
- (def: write (..write mock disk))
- (def: read (..read disk))
- (def: delete (..delete mock disk))
+ (def file? (..file? disk))
+ (def directory? (..directory? disk))
+ (def write (..write mock disk))
+ (def read (..read disk))
+ (def delete (..delete mock disk))
- (def: (file_size @)
+ (def (file_size @)
(do [! io.monad]
[disk (atom.read! disk)]
(in (case (dictionary.value @ disk)
@@ -146,7 +146,7 @@
_
{try.#Failure ""}))))
- (def: (last_modified @)
+ (def (last_modified @)
(do [! io.monad]
[disk (atom.read! disk)]
(in (case (dictionary.value @ disk)
@@ -155,7 +155,7 @@
_
{try.#Failure ""}))))
- (def: (can_execute? @)
+ (def (can_execute? @)
(do [! io.monad]
[disk (atom.read! disk)]
(in (case (dictionary.value @ disk)
@@ -165,7 +165,7 @@
_
{try.#Failure ""}))))
- (def: (make_directory @)
+ (def (make_directory @)
(do [! io.monad]
[disk' (atom.read! disk)]
(case (dictionary.value @ disk')
@@ -181,7 +181,7 @@
_
(in {try.#Failure ""}))))
- (def: (directory_files @)
+ (def (directory_files @)
(do [! io.monad]
[disk' (atom.read! disk)]
(case (dictionary.value @ disk')
@@ -192,7 +192,7 @@
_
(in {try.#Failure ""}))))
- (def: (sub_directories @)
+ (def (sub_directories @)
(do [! io.monad]
[disk' (atom.read! disk)]
(case (dictionary.value @ disk')
@@ -203,7 +203,7 @@
_
(in {try.#Failure ""}))))
- (def: (append @ it)
+ (def (append @ it)
(do [! io.monad]
[now instant.now
disk' (atom.read! disk)]
@@ -220,7 +220,7 @@
_
(in {try.#Failure ""}))))
- (def: (modify @ it)
+ (def (modify @ it)
(do [! io.monad]
[disk' (atom.read! disk)]
(case (dictionary.value @ disk')
@@ -231,14 +231,14 @@
_
(in {try.#Failure ""}))))
- (def: (move @ it)
+ (def (move @ it)
(do [! (try.with io.monad)]
[data (..read disk @)
write (..write mock disk it data)]
(..delete mock disk @)))
)))
-(def: .public test
+(def .public test
Test
(<| (_.covering /._)
(do [! random.monad]