kkallio@14: (* A source which can poll for changes and call an action on the new value kkallio@14: * when one is found. *) kkallio@14: kkallio@14: con changePoller :: Type -> Type kkallio@14: (* The type of pollers over the given type. *) kkallio@14: kkallio@14: val create : t ::: Type -> eq t -> t -> transaction (changePoller t) kkallio@14: (* From an initial value get a poller. *) kkallio@14: kkallio@14: val addChangeListener : t ::: Type -> eq t -> (t -> transaction unit) -> int -> changePoller t -> transaction unit kkallio@14: (* Add an action to run on changed values with a polling period given by the int. *) kkallio@14: kkallio@14: val ctl : t ::: Type -> changePoller t -> source t kkallio@14: (* Get a source to control or set the current value. *) kkallio@14: kkallio@14: val value : t ::: Type -> changePoller t -> signal t kkallio@14: (* A signal holding the current value. *)