diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/world/file/watch.lux | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index a4c5cfa57..c26923c54 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -273,12 +273,12 @@ (def: (default_list list) (All (_ a) (-> (java/util/List a) (List a))) - (let [size (.nat (java/util/List::size list))] + (let [size (.nat (ffi.of_int (java/util/List::size list)))] (loop [idx 0 output {.#End}] (if (n.< size idx) (again (++ idx) - {.#Item (java/util/List::get (.int idx) list) + {.#Item (java/util/List::get (ffi.as_int (.int idx)) list) output}) output)))) @@ -366,7 +366,7 @@ (async.future (java/nio/file/Path::register watcher watch_events' - (|> path java/io/File::new java/io/File::toPath))))) + (|> path ffi.as_string java/io/File::new java/io/File::toPath))))) (def: (default_poll watcher) (-> java/nio/file/WatchService (IO (Try (List [Concern //.Path])))) @@ -378,12 +378,13 @@ {.#Some key} (do [! io.monad] [valid? (java/nio/file/WatchKey::reset key)] - (if valid? + (if (ffi.of_boolean valid?) (do ! [.let [path (|> key java/nio/file/WatchKey::watchable (:as java/nio/file/Path) java/nio/file/Path::toString + ffi.of_string (:as //.Path))] the_concern (..default_key_concern key)] (again {.#Item [the_concern path] |