Mercurial > urweb
comparison demo/more/meta.ur @ 1008:1911e84df461
Move stuff from bulkEdit to meta
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 22 Oct 2009 11:51:31 -0400 |
parents | d3af9e54c828 |
children | 59097824f19b |
comparison
equal
deleted
inserted
replaced
1007:d3af9e54c828 | 1008:1911e84df461 |
---|---|
42 <b>{[col.Nam]}</b>: {col.Widget [nm]}<br/> | 42 <b>{[col.Nam]}</b>: {col.Widget [nm]}<br/> |
43 {useMore acc} | 43 {useMore acc} |
44 </xml>) | 44 </xml>) |
45 <xml/> | 45 <xml/> |
46 [_] fl r | 46 [_] fl r |
47 | |
48 fun allPopulatedTr [ts ::: {(Type * Type)}] (r : $(map meta ts)) (vs : $(map fst ts)) (fl : folder ts) = | |
49 foldR2 [meta] [fst] [fn cols :: {(Type * Type)} => | |
50 xml [Body, Form, Tr] [] (map snd cols)] | |
51 (fn [nm :: Name] [p :: (Type * Type)] [rest :: {(Type * Type)}] [[nm] ~ rest] | |
52 (m : meta p) v (acc : xml [Body, Form, Tr] [] (map snd rest)) => | |
53 <xml> | |
54 <td>{m.WidgetPopulated [nm] v}</td> | |
55 {useMore acc} | |
56 </xml>) | |
57 <xml/> | |
58 [_] fl r vs | |
59 | |
60 fun ensql [avail] [ts ::: {(Type * Type)}] (r : $(map meta ts)) (vs : $(map snd ts)) (fl : folder ts) = | |
61 map2 [meta] [snd] [fn ts :: (Type * Type) => sql_exp avail [] [] ts.1] | |
62 (fn [ts] meta v => @sql_inject meta.Inject (meta.Parse v)) | |
63 [_] fl r vs |