diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-09-19 10:56:09 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-09-19 10:56:09 -0400 |
commit | e6166ff9bc4f189cadaf235672543890ef922d11 (patch) | |
tree | 3be86f2aaa7287519695d46f43f61d98709e4149 | |
parent | b55c615a126b784c62714cd14048e892b6716991 (diff) |
Hopefully fixed Jscomp bug that was breaking Grid
-rw-r--r-- | demo/more/grid.ur | 12 | ||||
-rw-r--r-- | src/jscomp.sml | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/demo/more/grid.ur b/demo/more/grid.ur index 333e12a2..829fead0 100644 --- a/demo/more/grid.ur +++ b/demo/more/grid.ur @@ -57,7 +57,8 @@ functor Make(M : sig Updating : source bool, Selected : source bool}, Selection : source bool, - Filters : $(map thd3 M.cols)} + Filters : $(map thd3 M.cols), + Sort : source (option (M.row -> M.row -> bool))} fun newRow cols row = rowS <- source row; @@ -86,11 +87,13 @@ functor Make(M : sig rows <- Dlist.create; sel <- source False; + sort <- source None; return {Cols = cols, Rows = rows, Selection = sel, - Filters = filters} + Filters = filters, + Sort = sort} fun sync {Cols = cols, Rows = rows, ...} = Dlist.clear rows; @@ -218,7 +221,10 @@ functor Make(M : sig return (previous && this)) (fn _ => return True) [_] M.folder M.cols grid.Cols grid.Filters row, - Sort = return (Some (fn _ _ => return True))} + Sort = f <- signal grid.Sort; + return (Option.mp (fn f r1 r2 => r1 <- signal r1.Row; + r2 <- signal r2.Row; + return (f r1 r2)) f)} grid.Rows} <dyn signal={rows <- Dlist.foldl (fn row => Monad.mapR2 [aggregateMeta M.row] [id] [id] diff --git a/src/jscomp.sml b/src/jscomp.sml index 1d52f75d..dd375168 100644 --- a/src/jscomp.sml +++ b/src/jscomp.sml @@ -1055,7 +1055,7 @@ fun process file = (strcat (str "cs(function(){" :: locals @ [str "return ", - compact inner e, + (*compact inner*) e, str "})"]), st) end |