changeset 21:30f9a763f5fb

Tweak TogglePanel signature
author Adam Chlipala <adam@chlipala.net>
date Sat, 24 Sep 2011 17:35:33 -0400
parents 554e342665fe
children 7c734edc6301
files togglePanel.ur togglePanel.urs
diffstat 2 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/togglePanel.ur	Sat Sep 24 15:47:00 2011 -0400
+++ b/togglePanel.ur	Sat Sep 24 17:35:33 2011 -0400
@@ -1,9 +1,11 @@
 datatype panelState = Open | Closed
 
 con formatCtl = fn ctx :: {Unit} => [body ~ ctx] =>
-                   {FormatPanel : xbody -> xbody -> xml (body ++ ctx) [] [],
-                    OpenCtl : transaction unit -> xbody,
-                    CloseCtl : transaction unit -> xbody}
+                   {FormatPanel : xml (body ++ ctx) [] []
+                                  -> xml (body ++ ctx) [] []
+                                  -> xml (body ++ ctx) [] [],
+                    OpenCtl : transaction unit -> xml (body ++ ctx) [] [],
+                    CloseCtl : transaction unit -> xml (body ++ ctx) [] []}
 
 val defaultFormat [body ~ []] =
     {FormatPanel = fn ctl panel => <xml>{ctl}{panel}</xml>,
--- a/togglePanel.urs	Sat Sep 24 15:47:00 2011 -0400
+++ b/togglePanel.urs	Sat Sep 24 17:35:33 2011 -0400
@@ -7,7 +7,9 @@
  * are as for [Gui.gui]. *)
 
 con formatCtl = fn ctx :: {Unit} => [body ~ ctx] =>
-                   {FormatPanel : xbody -> xbody -> xml (body ++ ctx) [] [],
+                   {FormatPanel : xml (body ++ ctx) [] []
+                                  -> xml (body ++ ctx) [] []
+                                  -> xml (body ++ 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.
@@ -15,11 +17,11 @@
                      * The panel part appears and disappears according to the use
                      * of the controls. *)
                   
-                    OpenCtl : transaction unit -> xbody,
+                    OpenCtl : transaction unit -> xml (body ++ ctx) [] [],
                     (* This should accept the transaction representing the opening of
                      * the panel and produce an XML control having this as action. *)
 
-                    CloseCtl : transaction unit -> xbody}
+                    CloseCtl : transaction unit -> xml (body ++ ctx) [] []}
                     (* This should accept the transaction representing the closing of
                      * the panel and produce an xml control having this as action. *)