summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-09-17 19:15:10 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-09-17 19:15:10 -0400
commita438cc88d7f96ce4c4d7a1a65326430473325a37 (patch)
tree43fabaf463b021f4e60ee562ba4a4a2da786682b /demo
parent58d54b5e088ae016b6ec2f38bc2faa9852b3aacd (diff)
Pseudo-sort working with filters
Diffstat (limited to 'demo')
-rw-r--r--demo/more/dlist.ur6
-rw-r--r--demo/more/grid.ur2
2 files changed, 6 insertions, 2 deletions
diff --git a/demo/more/dlist.ur b/demo/more/dlist.ur
index 02286965..3d2cb49e 100644
--- a/demo/more/dlist.ur
+++ b/demo/more/dlist.ur
@@ -162,8 +162,12 @@ fun render [ctx] [ctx ~ body] [t] f (r : {Filter : t -> signal bool,
None => headPos dl
| Some prev => tailPos prev tl tlTop
in
+ b <- r.Filter v;
tl' <- signal tl;
- listOut (Some tl) tl' ((v, pos) :: acc)
+ listOut (Some tl) tl' (if b then
+ (v, pos) :: acc
+ else
+ acc)
end
in
listOut None hd []
diff --git a/demo/more/grid.ur b/demo/more/grid.ur
index a4157991..333e12a2 100644
--- a/demo/more/grid.ur
+++ b/demo/more/grid.ur
@@ -218,7 +218,7 @@ functor Make(M : sig
return (previous && this))
(fn _ => return True)
[_] M.folder M.cols grid.Cols grid.Filters row,
- Sort = return (Some (fn _ _ => return False))}
+ Sort = return (Some (fn _ _ => return True))}
grid.Rows}
<dyn signal={rows <- Dlist.foldl (fn row => Monad.mapR2 [aggregateMeta M.row] [id] [id]