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
commitae6417be71abf3da25f7708d3ead977a03417e31 (patch)
treec60abe4025d03517d3a685076e32aa3fc48093a0 /tests/transact.ur
parent686b727ebba1749f1936cfc39a7b6b1f1f6ebc0a (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>