|
From: Jérémie D. <Ba...@us...> - 2010-04-07 19:12:24
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "krobot".
The branch, master has been updated
via 643f8ebac80f42764a1bca95dd47bfee26441261 (commit)
from 1bd61bc9f4c1d64e4c371681792b22414565379f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 643f8ebac80f42764a1bca95dd47bfee26441261
Author: Jérémie Dimino <je...@di...>
Date: Wed Apr 7 21:11:57 2010 +0200
add the module Var
-----------------------------------------------------------------------
Changes:
diff --git a/info/control/common/var.ml b/info/control/common/var.ml
new file mode 100644
index 0000000..178e7cd
--- /dev/null
+++ b/info/control/common/var.ml
@@ -0,0 +1,21 @@
+(*
+ * var.ml
+ * ------
+ * Copyright : (c) 2010, Jeremie Dimino <je...@di...>
+ * Licence : BSD3
+ *
+ * This file is a part of [kro]bot.
+ *)
+
+type 'a t = {
+ signal : 'a React.signal;
+ setter : 'a -> unit;
+}
+
+let create value =
+ let signal, setter = React.S.create value in
+ { signal = signal; setter = setter }
+
+let signal var = var.signal
+let get var = React.S.value var.signal
+let set var value = var.setter value
diff --git a/info/control/common/var.mli b/info/control/common/var.mli
new file mode 100644
index 0000000..d3777e1
--- /dev/null
+++ b/info/control/common/var.mli
@@ -0,0 +1,17 @@
+(*
+ * var.mli
+ * -------
+ * Copyright : (c) 2010, Jeremie Dimino <je...@di...>
+ * Licence : BSD3
+ *
+ * This file is a part of [kro]bot.
+ *)
+
+(** A pair of a signal and its setter *)
+
+type 'a t
+
+val create : 'a -> 'a t
+val signal : 'a t -> 'a React.signal
+val get : 'a t -> 'a
+val set : 'a t -> 'a -> unit
hooks/post-receive
--
krobot
|