diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-01-02 12:42:39 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-01-02 12:42:39 -0500 |
commit | 5b54ae6f4d5896428cdab7b213471498fa8a0b8a (patch) | |
tree | 42dbcf05c7ae235d9893ff850e55d098f2e16a08 /tests | |
parent | 36e59f6512af87c02ba856372d71a6a47e9045fd (diff) |
Injected a record
Diffstat (limited to 'tests')
-rw-r--r-- | tests/jsinj.ur | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/jsinj.ur b/tests/jsinj.ur index bd416720..d9e09fb5 100644 --- a/tests/jsinj.ur +++ b/tests/jsinj.ur @@ -7,6 +7,7 @@ cookie int : int cookie float : float cookie string : string cookie bool : bool +cookie pair : int * float fun main () : transaction page = n <- getCookie int; @@ -25,6 +26,10 @@ fun main () : transaction page = b <- return (getOpt b True); sb <- source False; + p <- getCookie pair; + p <- return (getOpt p (1, 2.3)); + sp <- source (4, 5.6); + return <xml><body> <dyn signal={n <- signal sn; return <xml>{[n]}</xml>}/> <a onclick={set sn n}>CHANGE</a><br/> @@ -37,4 +42,7 @@ fun main () : transaction page = <dyn signal={b <- signal sb; return <xml>{[b]}</xml>}/> <a onclick={set sb b}>CHANGE</a><br/> + + <dyn signal={p <- signal sp; return <xml>{[p.1]}, {[p.2]}</xml>}/> + <a onclick={set sp p}>CHANGE</a><br/> </body></xml> |