comparison tests/cookieClear.ur @ 1423:bd6c90f5a428

Fix some cookie-related bugs in MonoReduce
author Adam Chlipala <adam@chlipala.net>
date Thu, 10 Feb 2011 08:46:46 -0500
parents
children
comparison
equal deleted inserted replaced
1422:07ef5771568d 1423:bd6c90f5a428
1 cookie c : int
2
3 fun setit () =
4 setCookie c {Value = 13,
5 Expires = None,
6 Secure = False};
7 return <xml/>
8
9 fun doit () =
10 ro <- getCookie c;
11 clearCookie c;
12 case ro of
13 None => return <xml>None</xml>
14 | Some v => return <xml>Some {[v]}</xml>
15
16 fun main () = return <xml><body>
17 <form><submit value="Set it!" action={setit}/></form>
18 <form><submit value="Get busy!" action={doit}/></form>
19 </body></xml>