summaryrefslogtreecommitdiff
path: root/tests/rpcList2.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-08-21 13:41:57 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-08-21 13:41:57 -0400
commitc0bc51a495cc806fe18b7cd3bee63be6c0f7cf3e (patch)
tree048f39efd512e604237cc836a8b2ee536ac75c57 /tests/rpcList2.ur
parent73ec19ef86ac9aca7f2b710cd29c9107ff7d5914 (diff)
Fix another list unurlification segfault bug; List.foldlMi
Diffstat (limited to 'tests/rpcList2.ur')
-rw-r--r--tests/rpcList2.ur10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/rpcList2.ur b/tests/rpcList2.ur
index c0739b84..e3ebb456 100644
--- a/tests/rpcList2.ur
+++ b/tests/rpcList2.ur
@@ -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>