caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [ANN] concurrent cell supports FRP(beta)
@ 2009-12-29  6:08 Satoshi Ogasawara
  0 siblings, 0 replies; only message in thread
From: Satoshi Ogasawara @ 2009-12-29  6:08 UTC (permalink / raw)
  To: caml-list

Hi list,

New beta release of concurrent cell supports thread safe FRP(Functional 
Reactive Programming).

 concurrent cell versoin 3.0 beta
https://forge.ocamlcore.org/frs/?group_id=42&release_id=227

There are two new modules Frp.TimeVaryReact and Frp.TimeVaryEvent 
consists of a type and functions as follows:

  module rec TimeVaryReact : sig
    type 'a t
    val make : ?src:'a Mbox.t -> 'a -> 'a t * ('a -> unit)
    val return : 'a -> 'a t
    val read : 'a t -> 'a
    val map : ('a -> 'b) -> 'a t -> 'b t
    val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
    val app : ('a -> 'b) t -> 'a t -> 'b t
    val join : 'a t t -> 'a t
    val switch : 'a t -> 'a t TimeVaryEvent.t -> 'a t
    val bind : 'a t -> ('a -> 'b t) -> 'b t
    val accum : 'a -> ('a -> 'a) TimeVaryEvent.t -> 'a t
    val fold : ('a -> 'b -> 'a) -> 'a -> 'b TimeVaryEvent.t -> 'a t
    val changes : ?eq:('a -> 'a -> bool) -> 'a t -> 'a TimeVaryEvent.t
    val history : int -> 'a t -> 'a list t
  end
  and TimeVaryEvent : sig
    type 'a t
    val make : ?src:'a Mbox.t -> unit -> 'a t * ('a -> unit)
    val map : ('a -> 'b) -> 'a t -> 'b t
    val listen : ('a -> unit) -> 'a t -> unit
    val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
    val merge : 'a t -> 'a t -> 'a t
    val filter : ('a -> bool) -> 'a t -> 'a t
    val fmap : ('a -> 'b option) -> 'a t -> 'b t
    val join : 'a t t -> 'a t
    val accum : 'a -> ('a -> 'a) t -> 'a t
    val fold : ('a -> 'b -> 'a) -> 'a  -> 'b t -> 'a t
    val select : 'a t list -> 'a t
    val switch : 'a t -> 'a t t -> 'a t
    val history : int -> 'a t -> 'a list t
    val with_prev : 'a t -> ('a * 'a) t
    val changes : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t
  end

This implementation based on this paper. (thanks to Conal Elliott) 
http://conal.net/papers/simply-reactive/

I intend to release version 3.0.0 after checking memory leaks, speed and 
bugs.

Regards
  ogasawara


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-29  6:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-29  6:08 [ANN] concurrent cell supports FRP(beta) Satoshi Ogasawara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).