diff demo/more/grid.ur @ 935:2422360c78a3

Dropped in initial aggregate types
author Adam Chlipala <adamc@hcoop.net>
date Tue, 15 Sep 2009 09:40:51 -0400
parents 5e8b6fa5b48f
children 6966d98c80b5
line wrap: on
line diff
--- a/demo/more/grid.ur	Mon Sep 14 19:04:38 2009 -0400
+++ b/demo/more/grid.ur	Tue Sep 15 09:40:51 2009 -0400
@@ -10,6 +10,11 @@
                  {Initialize : transaction global_t.1,
                   Handlers : global_t.1 -> colMeta' row global_t.2}                  
 
+con aggregateMeta = fn (row :: Type) (acc :: Type) =>
+                       {Initial : acc,
+                        Step : row -> acc -> acc,
+                        Display : acc -> xbody}
+
 functor Make(M : sig
                  type row
                  val list : transaction (list row)
@@ -21,6 +26,9 @@
                  val cols : $(map (colMeta row) cols)
 
                  val folder : folder cols
+
+                 con aggregates :: {Type}
+                 val aggregates : $(map (aggregateMeta row) aggregates)
              end) = struct
     style tabl
     style tr