summaryrefslogtreecommitdiff
path: root/tests/query.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-31 09:45:23 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-31 09:45:23 -0400
commitf8c1b7d3842354dbea3ed1e352647c258ba3eb9e (patch)
treebde187906d6a37036f77751713eed6d9b630b3ee /tests/query.ur
parentf275800f83cfeb86cef8f28b511bf37165d37ccd (diff)
Corify transaction wrappers
Diffstat (limited to 'tests/query.ur')
-rw-r--r--tests/query.ur12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/query.ur b/tests/query.ur
index 2caf0412..1039e40a 100644
--- a/tests/query.ur
+++ b/tests/query.ur
@@ -9,8 +9,14 @@ val r1 : transaction (list {A : int, B : string, C : float}) =
(fn fs _ acc => return (Cons (fs.T1, acc)))
Nil
-val r2 : transaction int =
+val r2 : transaction string =
ls <- r1;
return (case ls of
- Nil => 0
- | Cons ({A = a, ...}, _) => a)
+ Nil => "Problem"
+ | Cons ({B = b, ...}, _) => b)
+
+val main : unit -> transaction page = fn () =>
+ s <- r2;
+ return <html><body>
+ {cdata s}
+ </body></html>