summaryrefslogtreecommitdiff
path: root/tests/active.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-07-21 13:55:35 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-07-21 13:55:35 -0400
commit8ac6c0fe4425753c64fa0ef0a129d33eef36cb5c (patch)
treedd773f933c8b843112da1e81715f42c40cab8d8f /tests/active.ur
parent6ee57363d23e05fd783d8b7d151a249c0efdcd23 (diff)
<active>
Diffstat (limited to 'tests/active.ur')
-rw-r--r--tests/active.ur14
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>