Mercurial > urweb
annotate tests/rpcList2.ur @ 1997:c93fbd139732
Define uw_loggers structure, allow FFI code to access it
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Wed, 26 Feb 2014 08:21:52 +0000 |
parents | 553a5cc3a4b5 |
children |
rev | line source |
---|---|
adam@1547 | 1 fun showList l = case l of |
adam@1547 | 2 [] => "[]" |
adam@1547 | 3 | h :: t => strcat (strcat (show h) " :: ") (showList t) |
adam@1547 | 4 |
adam@1547 | 5 fun rpcFunc l : transaction string = |
adam@1547 | 6 case l of h :: _ => return (showList h) | [] => return "[]" |
adam@1545 | 7 |
adam@1545 | 8 fun main () : transaction page = return <xml><body> |
adam@1545 | 9 <button onclick={ |
adam@1547 | 10 s <- rpc (rpcFunc (("foo" :: []) :: [])); |
adam@1547 | 11 alert s |
adam@1545 | 12 }/> |
adam@1545 | 13 </body></xml> |