diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-01-01 10:49:42 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-01-01 10:49:42 -0500 |
commit | 914c437ab2251be982c4c19f659589360bf41a59 (patch) | |
tree | 153e0b43138171ab20f686aff9c6612f62729f4a /tests | |
parent | bad5b1a5635b3db83b4178c200e9a83d49ffc2d7 (diff) |
Used an option as a source
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stypes.ur | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/stypes.ur b/tests/stypes.ur index 4d918a91..1ac70834 100644 --- a/tests/stypes.ur +++ b/tests/stypes.ur @@ -11,4 +11,9 @@ fun main () : transaction page = <dyn signal={n <- signal sFloat; return <xml>{[n + 1.0]}</xml>}/> <a onclick={set sFloat 4.56}>Change</a><br/> <dyn signal={p <- signal sBoth; return <xml>{[p.1]}, {[p.2]}</xml>}/> <a onclick={set sBoth (8, 100.001)}>Change</a><br/> + + <dyn signal={o <- signal sOpt; case o of + None => return <xml>None</xml> + | Some n => return <xml>{[n]}</xml>}/> + <a onclick={set sOpt (Some 7)}>Change</a><br/> </body></xml> |