diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/world/file/watch.lux | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index 91cd25c53..c0d79ea50 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -114,7 +114,7 @@ (-> Concern //.Path (Var Directory_Tracker) (STM Bit)) (do [! stm.monad] [@tracker (stm.read tracker)] - (case (dictionary.value path @tracker) + (when (dictionary.value path @tracker) {.#Some [old_concern last_modified]} (do ! [_ (stm.update (dictionary.has path [new_concern last_modified]) tracker)] @@ -210,7 +210,7 @@ (stm.commit! (do stm.monad [@tracker (stm.read tracker)] - (in (case (dictionary.value path @tracker) + (in (when (dictionary.value path @tracker) {.#Some [it file_tracker]} {try.#Success it} @@ -220,7 +220,7 @@ (stm.commit! (do [! stm.monad] [@tracker (stm.read tracker)] - (case (dictionary.value path @tracker) + (when (dictionary.value path @tracker) {.#Some [the_concern file_tracker]} (do ! [_ (stm.update (dictionary.lacks path) tracker)] @@ -381,7 +381,7 @@ (list))]) (do (try.with io.monad) [?key (java/nio/file/WatchService::poll watcher)] - (case ?key + (when ?key {.#Some key} (do [! io.monad] [valid? (java/nio/file/WatchKey::reset key)] @@ -427,7 +427,7 @@ (function (_ path) (do [! async.monad] [@tracker (stm.commit! (stm.read tracker))] - (case (dictionary.value path @tracker) + (when (dictionary.value path @tracker) {.#Some [the_concern key]} (do ! [_ (async.future @@ -453,7 +453,7 @@ (def (concern path) (do async.monad [@tracker (stm.commit! (stm.read tracker))] - (case (dictionary.value path @tracker) + (when (dictionary.value path @tracker) {.#Some [it key]} (in {try.#Success it}) |