comparison togglePanel.ur @ 21:30f9a763f5fb

Tweak TogglePanel signature
author Adam Chlipala <adam@chlipala.net>
date Sat, 24 Sep 2011 17:35:33 -0400
parents 554e342665fe
children 5905b56e0cd9
comparison
equal deleted inserted replaced
20:554e342665fe 21:30f9a763f5fb
1 datatype panelState = Open | Closed 1 datatype panelState = Open | Closed
2 2
3 con formatCtl = fn ctx :: {Unit} => [body ~ ctx] => 3 con formatCtl = fn ctx :: {Unit} => [body ~ ctx] =>
4 {FormatPanel : xbody -> xbody -> xml (body ++ ctx) [] [], 4 {FormatPanel : xml (body ++ ctx) [] []
5 OpenCtl : transaction unit -> xbody, 5 -> xml (body ++ ctx) [] []
6 CloseCtl : transaction unit -> xbody} 6 -> xml (body ++ ctx) [] [],
7 OpenCtl : transaction unit -> xml (body ++ ctx) [] [],
8 CloseCtl : transaction unit -> xml (body ++ ctx) [] []}
7 9
8 val defaultFormat [body ~ []] = 10 val defaultFormat [body ~ []] =
9 {FormatPanel = fn ctl panel => <xml>{ctl}{panel}</xml>, 11 {FormatPanel = fn ctl panel => <xml>{ctl}{panel}</xml>,
10 OpenCtl = fn behaviour => <xml><button value="Open" onclick={behaviour}/></xml>, 12 OpenCtl = fn behaviour => <xml><button value="Open" onclick={behaviour}/></xml>,
11 CloseCtl = fn behaviour => <xml><button value="Close" onclick={behaviour}/></xml>} 13 CloseCtl = fn behaviour => <xml><button value="Close" onclick={behaviour}/></xml>}