Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Combinators for looping with a sleep interval, Internal
Synopsis
- untilJust :: forall t d u r a. Member (Time t d) r => TimeUnit u => u -> Sem r (Maybe a) -> Sem r a
- while :: forall t d u r. Member (Time t d) r => TimeUnit u => u -> Sem r Bool -> Sem r ()
- loop :: forall t d u a r. Member (Time t d) r => TimeUnit u => u -> a -> (a -> Sem r a) -> Sem r ()
- loop_ :: forall t d u r. Member (Time t d) r => TimeUnit u => u -> Sem r () -> Sem r ()
Documentation
untilJust :: forall t d u r a. Member (Time t d) r => TimeUnit u => u -> Sem r (Maybe a) -> Sem r a Source #
Repeatedly run the action
, sleeping for interval
between executions.
Stops when action
returns Just a
, returning the contained a
.
while :: forall t d u r. Member (Time t d) r => TimeUnit u => u -> Sem r Bool -> Sem r () Source #
Repeatedly run the action
, sleeping for interval
between executions.
Stops when action
returns False
.