diff options
Diffstat (limited to 'stdlib/source/library/lux/world/file/watch.lux')
-rw-r--r-- | stdlib/source/library/lux/world/file/watch.lux | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index 5800e68e1..1958e1403 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -32,7 +32,9 @@ [abstract (#+ abstract: :representation :abstraction)]]]] ["." //]) -(abstract: #export Concern +(abstract: .public Concern + {} + {#create Bit #modify Bit #delete Bit} @@ -45,14 +47,14 @@ #delete false})) (template [<concern> <predicate> <event> <create> <modify> <delete>] - [(def: #export <concern> + [(def: .public <concern> Concern (:abstraction {#create <create> #modify <modify> #delete <delete>})) - (def: #export <predicate> + (def: .public <predicate> (Predicate Concern) (|>> :representation (get@ <event>)))] @@ -64,14 +66,14 @@ false false true] ) - (def: #export (also left right) + (def: .public (also left right) (-> Concern Concern Concern) (:abstraction {#create (or (..creation? left) (..creation? right)) #modify (or (..modification? left) (..modification? right)) #delete (or (..deletion? left) (..deletion? right))})) - (def: #export all + (def: .public all Concern ($_ ..also ..creation @@ -80,7 +82,7 @@ )) ) -(interface: #export (Watcher !) +(interface: .public (Watcher !) (: (-> Concern //.Path (! (Try Any))) start) (: (-> //.Path (! (Try Concern))) @@ -91,7 +93,7 @@ poll)) (template [<name>] - [(exception: #export (<name> {path //.Path}) + [(exception: .public (<name> {path //.Path}) (exception.report ["Path" (%.text path)]))] @@ -182,7 +184,7 @@ modifications deletions]]))) -(def: #export (polling fs) +(def: .public (polling fs) (-> (//.System Async) (Watcher Async)) (let [tracker (: (Var Directory_Tracker) (stm.var (dictionary.empty text.hash)))] @@ -254,7 +256,7 @@ ))))) ))) -(def: #export (mock separator) +(def: .public (mock separator) (-> Text [(//.System Async) (Watcher Async)]) (let [fs (//.mock separator)] [fs @@ -405,7 +407,7 @@ (list)) )) - (def: #export default + (def: .public default (IO (Try (Watcher Async))) (do (try.with io.monad) [watcher (java/nio/file/FileSystem::newWatchService |