comparison demo/noisy.ur @ 908:ed06e25c70ef

Convert to requiring explicit 'rpc' marker
author Adam Chlipala <adamc@hcoop.net>
date Sat, 22 Aug 2009 12:55:18 -0400
parents a44daa674810
children e6bc6bbd7a32
comparison
equal deleted inserted replaced
907:5fe49effbc83 908:ed06e25c70ef
17 17
18 fun check ls = 18 fun check ls =
19 case ls of 19 case ls of
20 Nil => return () 20 Nil => return ()
21 | Cons (id, ls') => 21 | Cons (id, ls') =>
22 ao <- lookup id; 22 ao <- rpc (lookup id);
23 alert (case ao of 23 alert (case ao of
24 None => "Nada" 24 None => "Nada"
25 | Some a => a); 25 | Some a => a);
26 check ls' 26 check ls'
27 27
32 idDel <- source ""; 32 idDel <- source "";
33 33
34 return <xml><body> 34 return <xml><body>
35 <button value="Check values of 1, 2, and 3" onclick={check (Cons (1, Cons (2, Cons (3, Nil))))}/><br/> 35 <button value="Check values of 1, 2, and 3" onclick={check (Cons (1, Cons (2, Cons (3, Nil))))}/><br/>
36 <br/> 36 <br/>
37 <button value="Add" onclick={id <- get idAdd; a <- get aAdd; add (readError id) a}/> 37 <button value="Add" onclick={id <- get idAdd; a <- get aAdd; rpc (add (readError id) a)}/>
38 <ctextbox source={idAdd}/> 38 <ctextbox source={idAdd}/>
39 <ctextbox source={aAdd}/><br/> 39 <ctextbox source={aAdd}/><br/>
40 <br/> 40 <br/>
41 <button value="Delete" onclick={id <- get idDel; del (readError id)}/> 41 <button value="Delete" onclick={id <- get idDel; rpc (del (readError id))}/>
42 <ctextbox source={idDel}/> 42 <ctextbox source={idDel}/>
43 </body></xml> 43 </body></xml>