diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-07-21 13:55:35 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-07-21 13:55:35 -0400 |
commit | 17e8230265e8fb22d583c4ba33d4243f24d6b8bc (patch) | |
tree | dd773f933c8b843112da1e81715f42c40cab8d8f /tests | |
parent | a8e63939847f6fb02b2dc030adca09e554adb89f (diff) |
<active>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/active.ur | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/active.ur b/tests/active.ur new file mode 100644 index 00000000..e5fa68db --- /dev/null +++ b/tests/active.ur @@ -0,0 +1,14 @@ +fun counter' () = + s <- source 0; + return <xml> + <dyn signal={n <- signal s; return (txt n)}/> + <button onclick={fn _ => n <- get s; set s (n + 1)}/> + </xml> + +fun counter () = <xml><active code={counter' ()}/></xml> + +fun main () : transaction page = return <xml><body> + {counter ()} + <hr/> + {counter ()} +</body></xml> |