aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/auto.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex/command/auto.lux')
-rw-r--r--stdlib/source/program/aedifex/command/auto.lux16
1 files changed, 10 insertions, 6 deletions
diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux
index afce4d6ff..000384ccd 100644
--- a/stdlib/source/program/aedifex/command/auto.lux
+++ b/stdlib/source/program/aedifex/command/auto.lux
@@ -42,13 +42,17 @@
(#try.Failure error)
(wrap (list)))))
-(def: (pause _)
- (-> Any (Promise (Try Any)))
- (promise.delay 1,000 (#try.Success [])))
+(def: #export delay
+ Nat
+ 1,000)
-(def: #export (do! watcher command)
+(def: (pause delay)
+ (-> Nat (Promise (Try Any)))
+ (promise.delay delay (#try.Success [])))
+
+(def: #export (do! delay watcher command)
(All [a]
- (-> (Watcher Promise)
+ (-> Nat (Watcher Promise)
(-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command a))
(-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command Any))))
(function (_ console program fs shell resolution)
@@ -65,7 +69,7 @@
_ <call>]
(loop [_ []]
(do !
- [_ (..pause [])
+ [_ (..pause delay)
events (\ watcher poll [])
_ (case events
(#.Cons _)