-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Continuation patterns -- -- Make your actions to be observable and handle events from them. @package observable @version 0.1.2 module Control.Observable -- | Capture used here as limiter of continuation type Observable f a r = ContT r (Capture r f) a -- | Make continuation to be observable dispatch :: ContT r f a -> Observable f a r -- | Make monadic action to be observable obs :: Monad f => f a -> Observable f a r -- | Listen all events from action, call back just once subscribe :: Applicative f => Observable f a r -> (a -> f r) -> f r -- | Listen only first event, call back just once notify :: Observable f a r -> (a -> f r) -> f r -- | Listen only first event, call back forever uprise :: Applicative f => Observable f a r -> (a -> f r) -> f r module Control.Observable.Usage.Heartbeat -- | Listen event from action untill time limit is up alive :: Int -> Observable IO a r -> (a -> IO r) -> IO (Beaten r)