Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- type Observable f a r = ContT r (Capture r f) a
- dispatch :: ContT r f a -> Observable f a r
- obs :: Monad f => f a -> Observable f a r
- notify :: Observable f a r -> (a -> f r) -> f r
- follow :: Applicative f => Observable f a r -> (a -> f r) -> f r
- subscribe :: Applicative f => Observable f a r -> (a -> f r) -> f r
- watch :: Applicative f => Observable f a r -> (a -> f r) -> f r
- (.:~.) :: Observable f a r -> (a -> f r) -> f r
- (.:~*) :: Applicative f => Observable f a r -> (a -> f r) -> f r
- (*:~.) :: Applicative f => Observable f a r -> (a -> f r) -> f r
- (*:~*) :: Applicative f => Observable f a r -> (a -> f r) -> f r
Documentation
type Observable f a r = ContT r (Capture r f) a Source #
Capture used here as limiter of continuation
dispatch :: ContT r f a -> Observable f a r Source #
Make continuation to be observable
obs :: Monad f => f a -> Observable f a r Source #
Make monadic action to be observable
notify :: Observable f a r -> (a -> f r) -> f r Source #
Listen only first event, call back just once
follow :: Applicative f => Observable f a r -> (a -> f r) -> f r Source #
Listen only first event, call back forever
subscribe :: Applicative f => Observable f a r -> (a -> f r) -> f r Source #
Listen all events from action, call back just once
watch :: Applicative f => Observable f a r -> (a -> f r) -> f r Source #
Listen all events from action, call back forever
(.:~.) :: Observable f a r -> (a -> f r) -> f r Source #
Infix version of notify
(.:~*) :: Applicative f => Observable f a r -> (a -> f r) -> f r Source #
Infix version of follow
(*:~.) :: Applicative f => Observable f a r -> (a -> f r) -> f r Source #
Infix version of subscribe
(*:~*) :: Applicative f => Observable f a r -> (a -> f r) -> f r Source #
Infix version of watch