diff caching-tests/test.ur @ 2276:c05f9a5e0f0f

Progress on free paths, but consolidation seems to fail more with them.
author Ziv Scully <ziv@mit.edu>
date Mon, 09 Nov 2015 13:37:31 -0500
parents ce96e166d938
children b7615e0ac4b0
line wrap: on
line diff
--- a/caching-tests/test.ur	Sat Nov 07 15:16:44 2015 -0500
+++ b/caching-tests/test.ur	Mon Nov 09 13:37:31 2015 -0500
@@ -5,7 +5,23 @@
                         FROM tab
                         WHERE tab.Id = {[id]});
     return <xml><body>
-      Reading {[id]}.
+      (* Reading {[id]}. *)
+      {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 cacheR (r : {Id : int, FooBar : int}) =
+    res <- oneOrNoRows (SELECT tab.Val
+                        FROM tab
+                        WHERE tab.Id = {[r.Id]});
+    return <xml><body>
+      (* Reading {[r.Id]}. *)
       {case res of
            None => <xml>?</xml>
          | Some row => <xml>{[row.Tab.Val]}</xml>}