diff tests/rpcList2.ur @ 1547:553a5cc3a4b5

Fix another list unurlification segfault bug; List.foldlMi
author Adam Chlipala <adam@chlipala.net>
date Sun, 21 Aug 2011 13:41:57 -0400
parents 5f530f8e3511
children
line wrap: on
line diff
--- a/tests/rpcList2.ur	Sun Aug 21 10:55:31 2011 -0400
+++ b/tests/rpcList2.ur	Sun Aug 21 13:41:57 2011 -0400
@@ -1,7 +1,13 @@
-fun rpcFunc l : transaction {} = return ()
+fun showList l = case l of
+    [] => "[]"
+  | h :: t => strcat (strcat (show h) " :: ") (showList t)
+
+fun rpcFunc l : transaction string =
+  case l of h :: _ => return (showList h) | [] => return "[]"
 
 fun main () : transaction page = return <xml><body>
   <button onclick={
-    rpc (rpcFunc (("" :: []) :: []))
+    s <- rpc (rpcFunc  (("foo" :: []) :: []));
+    alert s
   }/>
   </body></xml>