summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-02-28 13:06:10 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-02-28 13:06:10 -0500
commit703c91af7525838dff97f88245bf7482745e771e (patch)
tree514a47d371580960d255dd83a28303a9035c319b /demo
parentf59bbf0b942cd888c798c06ba6841bf94562a438 (diff)
Changing foldRX to mapX
Diffstat (limited to 'demo')
-rw-r--r--demo/batchFun.ur6
-rw-r--r--demo/crud.ur4
-rw-r--r--demo/more/grid.ur8
3 files changed, 9 insertions, 9 deletions
diff --git a/demo/batchFun.ur b/demo/batchFun.ur
index 3f0317a8..f665b132 100644
--- a/demo/batchFun.ur
+++ b/demo/batchFun.ur
@@ -72,7 +72,7 @@ functor Make(M : sig
| Cons (r, ls) => <xml>
<tr>
<td>{[r.Id]}</td>
- {@foldRX2 [colMeta] [fst] [_]
+ {@mapX2 [colMeta] [fst] [_]
(fn [nm :: Name] [p :: (Type * Type)] [rest :: {(Type * Type)}]
[[nm] ~ rest] m v =>
<xml><td>{m.Show v}</td></xml>)
@@ -88,7 +88,7 @@ functor Make(M : sig
<xml><dyn signal={ls <- signal lss; return <xml><table>
<tr>
<th>Id</th>
- {@foldRX [colMeta] [_]
+ {@mapX [colMeta] [_]
(fn [nm :: Name] [p :: (Type * Type)] [rest :: {(Type * Type)}]
[[nm] ~ rest] m =>
<xml><th>{[m.Nam]}</th></xml>)
@@ -144,7 +144,7 @@ functor Make(M : sig
<table>
<tr> <th>Id:</th> <td><ctextbox source={id}/></td> </tr>
- {@foldRX2 [colMeta] [snd] [_]
+ {@mapX2 [colMeta] [snd] [_]
(fn [nm :: Name] [p :: (Type * Type)] [rest :: {(Type * Type)}]
[[nm] ~ rest] m s =>
<xml><tr> <th>{[m.Nam]}:</th> <td>{m.Widget s}</td> </tr></xml>)
diff --git a/demo/crud.ur b/demo/crud.ur
index bccc3822..7850e656 100644
--- a/demo/crud.ur
+++ b/demo/crud.ur
@@ -50,7 +50,7 @@ functor Make(M : sig
(fn (fs : {T : $([Id = int] ++ map fst M.cols)}) => <xml>
<tr>
<td>{[fs.T.Id]}</td>
- {@foldRX2 [fst] [colMeta] [tr]
+ {@mapX2 [fst] [colMeta] [tr]
(fn [nm :: Name] [t :: (Type * Type)] [rest :: {(Type * Type)}]
[[nm] ~ rest] v col => <xml>
<td>{col.Show v}</td>
@@ -66,7 +66,7 @@ functor Make(M : sig
<table border={1}>
<tr>
<th>ID</th>
- {@foldRX [colMeta] [tr]
+ {@mapX [colMeta] [tr]
(fn [nm :: Name] [t :: (Type * Type)] [rest :: {(Type * Type)}]
[[nm] ~ rest] col => <xml>
<th>{cdata col.Nam}</th>
diff --git a/demo/more/grid.ur b/demo/more/grid.ur
index 7540ca27..d560c556 100644
--- a/demo/more/grid.ur
+++ b/demo/more/grid.ur
@@ -123,7 +123,7 @@ functor Make(M : sig
<table class={tabl}>
<tr class={tr}>
<th/> <th/> <th><button value="No sort" onclick={set grid.Sort None}/></th>
- {@foldRX2 [fst3] [colMeta M.row] [_]
+ {@mapX2 [fst3] [colMeta M.row] [_]
(fn [nm :: Name] [p :: (Type * Type * Type)] [rest :: {(Type * Type * Type)}] [[nm] ~ rest]
data (meta : colMeta M.row p) =>
<xml><th class={th}>
@@ -208,7 +208,7 @@ functor Make(M : sig
</td>
<dyn signal={cols <- signal colsS;
- return (@foldRX3 [fst3] [colMeta M.row] [snd3] [_]
+ return (@mapX3 [fst3] [colMeta M.row] [snd3] [_]
(fn [nm :: Name] [t :: (Type * Type * Type)]
[rest :: {(Type * Type * Type)}]
[[nm] ~ rest] data meta v =>
@@ -260,14 +260,14 @@ functor Make(M : sig
M.aggFolder M.aggregates) grid.Rows;
return <xml><tr>
<th colspan={3}>Aggregates</th>
- {@foldRX2 [aggregateMeta M.row] [id] [_]
+ {@mapX2 [aggregateMeta M.row] [id] [_]
(fn [nm :: Name] [t :: Type] [rest :: {Type}] [[nm] ~ rest] meta acc =>
<xml><td class={agg}>{meta.Display acc}</td></xml>)
M.aggFolder M.aggregates rows}
</tr></xml>}/>
<tr><th colspan={3}>Filters</th>
- {@foldRX3 [colMeta M.row] [fst3] [thd3] [_]
+ {@mapX3 [colMeta M.row] [fst3] [thd3] [_]
(fn [nm :: Name] [p :: (Type * Type * Type)] [rest :: {(Type * Type * Type)}] [[nm] ~ rest]
meta state filter => <xml><td>{(meta.Handlers state).DisplayFilter filter}</td></xml>)
M.folder M.cols grid.Cols grid.Filters}