From b7d668bb4647c4216df7120b4b8f8d5c6e8257f0 Mon Sep 17 00:00:00 2001 From: Ziv Scully Date: Tue, 10 Nov 2015 12:35:00 -0500 Subject: Fix bug in and clean up free path code. --- caching-tests/test.ur | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'caching-tests') 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 - (* Reading {[id]}. *) + cache {case res of None => ? | Some row => {[row.Tab.Val]}} -(* 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 - (* Reading {[r.Id]}. *) + cacheR {[r.FooBar]} {case res of None => ? | Some row => {[row.Tab.Val]}} -- cgit v1.2.3