pandora-0.1.6: A box of patterns and paradigms

Safe HaskellSafe
LanguageHaskell2010

Pandora.Paradigm.Controlflow.Observable

Synopsis

Documentation

type Observable t a r = Continuation r (Capture r t) a Source #

observe :: Continuation r t a -> Observable t a r Source #

Make continuation observable

notify :: Observable t a r -> (a -> t r) -> t r Source #

Listen only first event, call back just once

follow :: Applicative t => Observable t a r -> (a -> t r) -> t r Source #

Listen only first event, call back forever

subscribe :: Applicative t => Observable t a r -> (a -> t r) -> t r Source #

Listen all events from action, call back just once

watch :: Applicative t => Observable t a r -> (a -> t r) -> t r Source #

Listen all events from action, call back forever

(.:~.) :: Observable t a r -> (a -> t r) -> t r Source #

Infix version of notify

(.:~*) :: Applicative t => Observable t a r -> (a -> t r) -> t r Source #

Infix version of follow

(*:~.) :: Applicative t => Observable t a r -> (a -> t r) -> t r Source #

Infix version of subscribe

(*:~*) :: Applicative t => Observable t a r -> (a -> t r) -> t r Source #

Infix version of watch