-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Monadic loops for STM -- -- Some useful control operators for looping. @package monad-loops-stm @version 0.4 module Control.Monad.Loops.STM -- | forever and atomically rolled into one. atomLoop :: STM a -> IO () -- | atomLoop with a forkIO forkAtomLoop :: STM a -> IO ThreadId -- | retry until the given condition is true of the given value. -- Then return the value that satisfied the condition. waitFor :: (a -> Bool) -> STM a -> STM a -- | retry until the given value is True. waitForTrue :: STM Bool -> STM () -- | retry until the given value is Just _, returning the -- contained value. waitForJust :: STM (Maybe a) -> STM a -- | waitFor a value satisfying a condition to come out of a -- TChan, reading and discarding everything else. Returns the -- winner. waitForEvent :: (a -> Bool) -> TChan a -> STM a