diff datebox.urs @ 19:3a303df9ae92

Partial generalize togglePanel solution (breaks build)
author Ron de Bruijn <rmbruijn@gmail.com>
date Fri, 23 Sep 2011 13:30:01 +0200
parents 8300d5f0dc19
children 554e342665fe
line wrap: on
line diff
--- a/datebox.urs	Thu Sep 22 19:24:01 2011 +0200
+++ b/datebox.urs	Fri Sep 23 13:30:01 2011 +0200
@@ -1,4 +1,5 @@
-type t
+con t::{Unit}->Type
+
 (* The type of dateboxes, which are input elements
  * allowing the user to select a date from a popup
  * calendar. *)
@@ -10,17 +11,17 @@
 val date : time -> date
 (* Type of dates and some useful utility functions. *)
 
-val create : time -> transaction t
+val create : other_ctx:::{Unit} -> [other_ctx ~ body] => time -> transaction (t other_ctx)
 (* Get a datebox initially set to the given time. *)
 
-val onChange : t -> (date -> transaction {}) -> transaction {}
+val onChange : other_ctx:::{Unit} -> [other_ctx ~ body] => t other_ctx -> (date -> transaction {}) -> transaction {}
 (* Add an action to be run when the date changes. *)
 
-val set : t -> date -> transaction {}
+val set : other_ctx:::{Unit} -> [other_ctx ~ body] => t other_ctx -> date -> transaction {}
 (* Call this to change the selected date. *)
 
-val value : t -> signal date
+val value : other_ctx:::{Unit} -> [other_ctx ~ body] => t other_ctx -> signal date
 (* Extract the current date value. *)
 
-val render : t -> xbody
+val render : other_ctx:::{Unit} -> [other_ctx ~ body] =>  t other_ctx -> xml ([Body] ++ other_ctx) [] []
 (* Draws the datebox as a piece of xml. *)