aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/world/file/watch.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/world/file/watch.lux')
-rw-r--r--stdlib/source/library/lux/world/file/watch.lux36
1 files changed, 18 insertions, 18 deletions
diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux
index 3af235af1..46308d6e3 100644
--- a/stdlib/source/library/lux/world/file/watch.lux
+++ b/stdlib/source/library/lux/world/file/watch.lux
@@ -112,7 +112,7 @@
(do [! stm.monad]
[@tracker (stm.read tracker)]
(case (dictionary.value path @tracker)
- (#.Some [old_concern last_modified])
+ {#.Some [old_concern last_modified]}
(do !
[_ (stm.update (dictionary.has path [new_concern last_modified]) tracker)]
(in true))
@@ -196,20 +196,20 @@
(do !
[updated? (stm.commit! (..update_watch! new_concern path tracker))]
(if updated?
- (in (#try.Success []))
+ (in {#try.Success []})
(do (try.with !)
[file_tracker (..file_tracker fs path)]
(do !
[_ (stm.commit! (stm.update (dictionary.has path [new_concern file_tracker]) tracker))]
- (in (#try.Success []))))))
+ (in {#try.Success []})))))
(in (exception.except ..cannot_poll_a_non_existent_directory [path])))))
(def: (concern path)
(stm.commit!
(do stm.monad
[@tracker (stm.read tracker)]
(in (case (dictionary.value path @tracker)
- (#.Some [concern file_tracker])
- (#try.Success concern)
+ {#.Some [concern file_tracker]}
+ {#try.Success concern}
#.None
(exception.except ..not_being_watched [path]))))))
@@ -218,10 +218,10 @@
(do [! stm.monad]
[@tracker (stm.read tracker)]
(case (dictionary.value path @tracker)
- (#.Some [concern file_tracker])
+ {#.Some [concern file_tracker]}
(do !
[_ (stm.update (dictionary.lacks path) tracker)]
- (in (#try.Success concern)))
+ (in {#try.Success concern}))
#.None
(in (exception.except ..not_being_watched [path]))))))
@@ -237,7 +237,7 @@
(list\each product.left)
(dictionary.of_list text.hash))
tracker))]
- (in (#try.Success [])))
+ (in {#try.Success []}))
.let [[creations modifications deletions]
(list\mix (function (_ [_ [creations modifications deletions]]
[all_creations all_modifications all_deletions])
@@ -278,8 +278,8 @@
output #.End]
(if (n.< size idx)
(recur (++ idx)
- (#.Item (java/util/List::get (.int idx) list)
- output))
+ {#.Item (java/util/List::get (.int idx) list)
+ output})
output))))
(import: (java/nio/file/WatchEvent$Kind a))
@@ -375,7 +375,7 @@
(do (try.with io.monad)
[?key (java/nio/file/WatchService::poll watcher)]
(case ?key
- (#.Some key)
+ {#.Some key}
(do [! io.monad]
[valid? (java/nio/file/WatchKey::reset key)]
(if valid?
@@ -386,8 +386,8 @@
java/nio/file/Path::toString
(:as //.Path))]
concern (..default_key_concern key)]
- (recur (#.Item [concern path]
- output)))
+ (recur {#.Item [concern path]
+ output}))
(recur output)))
#.None
@@ -420,12 +420,12 @@
(do [! async.monad]
[@tracker (stm.commit! (stm.read tracker))]
(case (dictionary.value path @tracker)
- (#.Some [concern key])
+ {#.Some [concern key]}
(do !
[_ (async.future
(java/nio/file/WatchKey::cancel key))
_ (stm.commit! (stm.update (dictionary.lacks path) tracker))]
- (in (#try.Success concern)))
+ (in {#try.Success concern}))
#.None
(in (exception.except ..not_being_watched [path]))))))]]
@@ -441,13 +441,13 @@
path)]
(do async.monad
[_ (stm.commit! (stm.update (dictionary.has path [concern key]) tracker))]
- (in (#try.Success []))))))
+ (in {#try.Success []})))))
(def: (concern path)
(do async.monad
[@tracker (stm.commit! (stm.read tracker))]
(case (dictionary.value path @tracker)
- (#.Some [concern key])
- (in (#try.Success concern))
+ {#.Some [concern key]}
+ (in {#try.Success concern})
#.None
(in (exception.except ..not_being_watched [path])))))