summaryrefslogtreecommitdiff
path: root/tests/transact.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-12-04 11:15:20 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2010-12-04 11:15:20 -0500
commit5e90aecd290f5ae8b4b10367cc0d8995be2a1d9d (patch)
treec60abe4025d03517d3a685076e32aa3fc48093a0 /tests/transact.ur
parent1c98f161a0e110b52e1000e731e0fc7bcb4d31b0 (diff)
New argument to transactional free functions, to specify whether we are about to retry
Diffstat (limited to 'tests/transact.ur')
-rw-r--r--tests/transact.ur13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/transact.ur b/tests/transact.ur
new file mode 100644
index 00000000..baf8ab94
--- /dev/null
+++ b/tests/transact.ur
@@ -0,0 +1,13 @@
+fun listHell n =
+ if n <= 0 then
+ []
+ else
+ n :: List.append (listHell (n-1)) (listHell (n-1))
+
+fun doit r =
+ Transactional.foo;
+ return <xml>{[listHell (readError r.N)]}</xml>
+
+fun main () = return <xml><body>
+ <form> <textbox{#N}/> <submit action={doit}/> </form>
+</body></xml>