Mercurial > urweb
view tests/rpchan.ur @ 2126:ec1614fb97bb
Change MonoReduce to do fixed-pointing, since it sometimes enables more optimizations for itself (e.g., yanking lambdas out of [case]s)
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 06 Mar 2015 09:46:21 -0500 |
parents | 3dd041b00087 |
children |
line wrap: on
line source
fun remote () = ch <- channel; send ch "Hello World!"; return ch fun remoter () = ch <- channel; send ch "Hello World!"; return <xml><active code={spawn (s <- recv ch; alert s); return <xml/>}/></xml> fun main () = x <- source <xml/>; return <xml><body> <button onclick={fn _ => ch <- rpc (remote ()); s <- recv ch; alert s}>TEST</button> <button onclick={fn _ => y <- rpc (remoter ()); set x y}>TESTER</button> <hr/> <dyn signal={signal x}/> </body></xml>