diff demo/more/meta.ur @ 1011:16f7cb0891b6

Initial support for char in SQL
author Adam Chlipala <adamc@hcoop.net>
date Thu, 22 Oct 2009 16:15:56 -0400
parents 59097824f19b
children 6bcc1020d5cd
line wrap: on
line diff
--- a/demo/more/meta.ur	Thu Oct 22 14:05:48 2009 -0400
+++ b/demo/more/meta.ur	Thu Oct 22 16:15:56 2009 -0400
@@ -52,6 +52,18 @@
           <xml/>
           [_] fl r
 
+fun allPopulated [ts ::: {(Type * Type)}] (r : $(map meta ts)) (vs : $(map fst ts)) (fl : folder ts) =
+    foldR2 [meta] [fst] [fn cols :: {(Type * Type)} =>
+                            xml form [] (map snd cols)]
+           (fn [nm :: Name] [p :: (Type * Type)] [rest :: {(Type * Type)}] [[nm] ~ rest]
+                            (m : meta p) v (acc : xml form [] (map snd rest)) => 
+               <xml>
+                 {[m.Nam]}: {m.WidgetPopulated [nm] v}<br/>
+                 {useMore acc}
+               </xml>)
+           <xml/>
+           [_] fl r vs
+
 fun allPopulatedTr [ts ::: {(Type * Type)}] (r : $(map meta ts)) (vs : $(map fst ts)) (fl : folder ts) =
     foldR2 [meta] [fst] [fn cols :: {(Type * Type)} =>
                             xml [Body, Form, Tr] [] (map snd cols)]