diff demo/more/meta.ur @ 1009:59097824f19b

Viewing papers
author Adam Chlipala <adamc@hcoop.net>
date Thu, 22 Oct 2009 12:16:31 -0400
parents 1911e84df461
children 16f7cb0891b6
line wrap: on
line diff
--- a/demo/more/meta.ur	Thu Oct 22 11:51:31 2009 -0400
+++ b/demo/more/meta.ur	Thu Oct 22 12:16:31 2009 -0400
@@ -35,6 +35,13 @@
                      Parse = fn s => s,
                      Inject = _}
 
+fun allContent [ts ::: {(Type * Type)}] (r : $(map meta ts)) (vs : $(map fst ts)) (fl : folder ts) =
+    foldRX2 [meta] [fst] [_]
+            (fn [nm :: Name] [p :: (Type * Type)] [rest :: {(Type * Type)}] [[nm] ~ rest]
+                             (m : meta p) v =>
+                <xml><b>{[m.Nam]}</b>: {m.Show v}<br/></xml>)
+            [_] fl r vs
+
 fun allWidgets [ts ::: {(Type * Type)}] (r : $(map meta ts)) (fl : folder ts) =
     foldR [meta] [fn ts :: {(Type * Type)} => xml form [] (map snd ts)]
           (fn [nm :: Name] [t :: (Type * Type)] [rest :: {(Type * Type)}]