Mercurial > urweb
view tests/rpcM.ur @ 1906:0d2fdc2cc46c
Allow building in a separate build directory
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
---
Makefile.am | 30 +++---
src/c/Makefile.am | 2 +-
src/compiler.mlb | 2 +-
src/sources | 302 +++++++++++++++++++++++++++---------------------------
4 files changed, 168 insertions(+), 168 deletions(-)
author | Anders Kaseorg <andersk@mit.edu> |
---|---|
date | Fri, 22 Nov 2013 09:36:14 -0500 |
parents | 4a125bbc602d |
children |
line wrap: on
line source
datatype list t = Nil | Cons of t * list t sequence s fun main () : transaction page = let fun getIndices srcs = case srcs of Nil => return Nil | Cons (src, srcs') => i <- nextval s; set src i; ls <- getIndices srcs'; return (Cons (i, ls)) fun show ls = case ls of Nil => <xml/> | Cons (x, ls') => <xml>{[x]}<br/>{show ls'}</xml> in src1 <- source 0; src2 <- source 1; s <- source Nil; return <xml><body> <button value="Get It On!" onclick={ns <- getIndices (Cons (src1, Cons (src2, Nil))); set s ns}/><br/> <br/> #1: <dyn signal={n <- signal src1; return <xml>{[n]}</xml>}/><br/> #2: <dyn signal={n <- signal src2; return <xml>{[n]}</xml>}/><br/> Current: <dyn signal={ns <- signal s; return (show ns)}/> </body></xml> end