summaryrefslogtreecommitdiff
path: root/caching-tests
diff options
context:
space:
mode:
authorGravatar Ziv Scully <ziv@mit.edu>2015-11-10 12:35:00 -0500
committerGravatar Ziv Scully <ziv@mit.edu>2015-11-10 12:35:00 -0500
commitb7d668bb4647c4216df7120b4b8f8d5c6e8257f0 (patch)
tree29f8b41b067ed5210de67664a5cfdadfed30a7b4 /caching-tests
parent91e5530ace053b1b9ea3a1fe64ce638ae6493314 (diff)
Fix bug in and clean up free path code.
Diffstat (limited to 'caching-tests')
-rw-r--r--caching-tests/test.ur12
1 files changed, 6 insertions, 6 deletions
diff --git a/caching-tests/test.ur b/caching-tests/test.ur
index 0549840d..cbfde556 100644
--- a/caching-tests/test.ur
+++ b/caching-tests/test.ur
@@ -5,23 +5,23 @@ fun cache id =
FROM tab
WHERE tab.Id = {[id]});
return <xml><body>
- (* Reading {[id]}. *)
+ cache
{case res of
None => <xml>?</xml>
| Some row => <xml>{[row.Tab.Val]}</xml>}
</body></xml>
-(* fun sillyRecursive {Id = id, FooBar = fooBar} = *)
-(* if fooBar <= 0 *)
-(* then 0 *)
-(* else 1 + sillyRecursive {Id = id, FooBar = fooBar - 1} *)
+fun sillyRecursive {Id = id : int, FooBar = fooBar} =
+ if fooBar <= 0
+ then 0
+ else 1 + sillyRecursive {Id = id, FooBar = fooBar - 1}
fun cacheR (r : {Id : int, FooBar : int}) =
res <- oneOrNoRows (SELECT tab.Val
FROM tab
WHERE tab.Id = {[r.Id]});
return <xml><body>
- (* Reading {[r.Id]}. *)
+ cacheR {[r.FooBar]}
{case res of
None => <xml>?</xml>
| Some row => <xml>{[row.Tab.Val]}</xml>}