diff options
author | Ziv Scully <ziv@mit.edu> | 2015-11-10 12:35:00 -0500 |
---|---|---|
committer | Ziv Scully <ziv@mit.edu> | 2015-11-10 12:35:00 -0500 |
commit | b7d668bb4647c4216df7120b4b8f8d5c6e8257f0 (patch) | |
tree | 29f8b41b067ed5210de67664a5cfdadfed30a7b4 /caching-tests/test.ur | |
parent | 91e5530ace053b1b9ea3a1fe64ce638ae6493314 (diff) |
Fix bug in and clean up free path code.
Diffstat (limited to 'caching-tests/test.ur')
-rw-r--r-- | caching-tests/test.ur | 12 |
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>} |