From 0c87867a27b7fdf258d304d95b3c2d0841ad905b Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 8 Mar 2009 12:54:07 -0400 Subject: RPC returning an option datatype --- tests/rpcDO.ur | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/rpcDO.ur (limited to 'tests/rpcDO.ur') diff --git a/tests/rpcDO.ur b/tests/rpcDO.ur new file mode 100644 index 00000000..4ba6015c --- /dev/null +++ b/tests/rpcDO.ur @@ -0,0 +1,25 @@ +datatype list t = Nil | Cons of t * list t + +table t : {A : int} + +fun main () : transaction page = + let + fun rows () = + query (SELECT * FROM t) + (fn r ls => return (Cons (r.T.A, ls))) + Nil + + fun show ls = + case ls of + Nil => + | Cons (x, ls') => {[x]}
{show ls'}
+ in + s <- source Nil; + return +