diff togglePanel.urs @ 27:5905b56e0cd9

Adapt to new HTML contexts
author Adam Chlipala <adam@chlipala.net>
date Tue, 20 Dec 2011 21:04:21 -0500
parents 30f9a763f5fb
children 7d0014542199
line wrap: on
line diff
--- a/togglePanel.urs	Fri Dec 09 17:38:20 2011 -0500
+++ b/togglePanel.urs	Tue Dec 20 21:04:21 2011 -0500
@@ -6,10 +6,10 @@
 (* The type of appearing and disappearing panels.  The arguments
  * are as for [Gui.gui]. *)
 
-con formatCtl = fn ctx :: {Unit} => [body ~ ctx] =>
-                   {FormatPanel : xml (body ++ ctx) [] []
-                                  -> xml (body ++ ctx) [] []
-                                  -> xml (body ++ ctx) [] [],
+con formatCtl = fn ctx :: {Unit} => [[Dyn] ~ ctx] =>
+                   {FormatPanel : xml ([Dyn] ++ ctx) [] []
+                                  -> xml ([Dyn] ++ ctx) [] []
+                                  -> xml ([Dyn] ++ ctx) [] [],
                     (* Allows for formatting the panel.  The first two parameters
                      * represent "holes" for the control and panel respectively while
                      * the result should be the desired XML laying out the whole structure.
@@ -17,19 +17,19 @@
                      * The panel part appears and disappears according to the use
                      * of the controls. *)
                   
-                    OpenCtl : transaction unit -> xml (body ++ ctx) [] [],
+                    OpenCtl : transaction unit -> xml ([Dyn] ++ ctx) [] [],
                     (* This should accept the transaction representing the opening of
                      * the panel and produce an XML control having this as action. *)
 
-                    CloseCtl : transaction unit -> xml (body ++ ctx) [] []}
+                    CloseCtl : transaction unit -> xml ([Dyn] ++ ctx) [] []}
                     (* This should accept the transaction representing the closing of
                      * the panel and produce an xml control having this as action. *)
 
 (* Some reasonable default formats for the layout and controls. *)
-val defaultFormat : formatCtl []
+val defaultFormat : formatCtl body'
 
 val create : t ::: Type -> ctx ::: {Unit} ->
-    formatCtl ctx (* Formatting instructions *)
+    formatCtl ctx    (* Formatting instructions *)
     -> t             (* Enclosed widget *)
     -> bool          (* Start in open state? *)
     -> transaction (togglePanel t ctx)