Mercurial > urweb
view tests/cookieSec.ur @ 1181:618f9f458da9
Got split1 working, but noticed a nasty type inference bug with transplanted unification variables
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 06 Mar 2010 19:14:48 -0500 |
parents | f2a2be93331c |
children |
line wrap: on
line source
table t : {Id : int} cookie c : int fun setter r = setCookie c (readError r.Id); return <xml>Done</xml> fun writer () = ido <- getCookie c; case ido of None => error <xml>No cookie</xml> | Some id => dml (INSERT INTO t (Id) VALUES ({[id]})); return <xml>Done</xml> fun main () = return <xml><body> <form> <textbox{#Id}/> <submit value="Get cookie" action={setter}/> </form> <form> <submit value="Write to database" action={writer}/> </form> </body></xml>