Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] [ANN] concurrent cell supports FRP(beta)

1 view
Skip to first unread message

Satoshi Ogasawara

unread,
Dec 29, 2009, 1:08:37 AM12/29/09
to caml...@inria.fr
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

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

0 new messages