summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
Diffstat (limited to 'demo')
-rw-r--r--demo/batch.ur6
-rw-r--r--demo/batchG.ur16
-rw-r--r--demo/increment.ur6
-rw-r--r--demo/noisy.ur6
4 files changed, 9 insertions, 25 deletions
diff --git a/demo/batch.ur b/demo/batch.ur
index b7007913..4100749f 100644
--- a/demo/batch.ur
+++ b/demo/batch.ur
@@ -37,7 +37,7 @@ fun show withDel lss =
</table></xml>}/></xml>
end
-fun action () =
+fun main () =
lss <- source Nil;
batched <- source Nil;
@@ -79,7 +79,3 @@ fun action () =
<button value="Execute" onclick={exec ()}/>
</body></xml>
end
-
-fun main () = return <xml><body>
- <form><submit value="Begin demo" action={action}/></form>
-</body></xml>
diff --git a/demo/batchG.ur b/demo/batchG.ur
index ea658164..d0071d7d 100644
--- a/demo/batchG.ur
+++ b/demo/batchG.ur
@@ -1,13 +1,9 @@
table t : {Id : int, A : string, B : float}
PRIMARY KEY Id
-structure B = BatchFun.Make(struct
- val tab = t
- val title = "BatchG"
- val cols = {A = BatchFun.string "A",
- B = BatchFun.float "B"}
- end)
-
-fun main () = return <xml><body>
- <form><submit value="Begin demo" action={B.main}/></form>
-</body></xml>
+open BatchFun.Make(struct
+ val tab = t
+ val title = "BatchG"
+ val cols = {A = BatchFun.string "A",
+ B = BatchFun.float "B"}
+ end)
diff --git a/demo/increment.ur b/demo/increment.ur
index 36b8191f..a74e80df 100644
--- a/demo/increment.ur
+++ b/demo/increment.ur
@@ -2,13 +2,9 @@ sequence seq
fun increment () = nextval seq
-fun action () =
+fun main () =
src <- source 0;
return <xml><body>
<dyn signal={n <- signal src; return <xml>{[n]}</xml>}/>
<button value="Update" onclick={n <- increment (); set src n}/>
</body></xml>
-
-fun main () = return <xml><body>
- <form><submit value="Begin demo" action={action}/></form>
-</body></xml>
diff --git a/demo/noisy.ur b/demo/noisy.ur
index 7f26eaf2..708cfa2c 100644
--- a/demo/noisy.ur
+++ b/demo/noisy.ur
@@ -25,7 +25,7 @@ fun check ls =
| Some a => a);
check ls'
-fun action () =
+fun main () =
idAdd <- source "";
aAdd <- source "";
@@ -41,7 +41,3 @@ fun action () =
<button value="Delete" onclick={id <- get idDel; del (readError id)}/>
<ctextbox source={idDel}/>
</body></xml>
-
-fun main () = return <xml><body>
- <form><submit value="Begin demo" action={action}/></form>
-</body></xml>