aboutsummaryrefslogtreecommitdiffhomepage
path: root/demo/more/meta.ur
diff options
context:
space:
mode:
Diffstat (limited to 'demo/more/meta.ur')
-rw-r--r--demo/more/meta.ur7
1 files changed, 7 insertions, 0 deletions
diff --git a/demo/more/meta.ur b/demo/more/meta.ur
index 944db822..9470eea0 100644
--- a/demo/more/meta.ur
+++ b/demo/more/meta.ur
@@ -35,6 +35,13 @@ fun textarea name = {Nam = name,
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)}]