comparison demo/metaform.ur @ 632:6c4643880df5

Demos compile again, with manual folders
author Adam Chlipala <adamc@hcoop.net>
date Tue, 24 Feb 2009 15:12:13 -0500
parents ad7e854a518c
children aa2290c32ce2
comparison
equal deleted inserted replaced
631:effa7d43aac3 632:6c4643880df5
1 functor Make (M : sig 1 functor Make (M : sig
2 con fs :: {Unit} 2 con fs :: {Unit}
3 val fl : folder fs
3 val names : $(mapUT string fs) 4 val names : $(mapUT string fs)
4 end) = struct 5 end) = struct
5 6
6 fun handler values = return <xml><body> 7 fun handler values = return <xml><body>
7 {foldURX2 [string] [string] [body] 8 {foldURX2 [string] [string] [body]
8 (fn (nm :: Name) (rest :: {Unit}) [[nm] ~ rest] name value => <xml> 9 (fn (nm :: Name) (rest :: {Unit}) [[nm] ~ rest] name value => <xml>
9 <li> {[name]} = {[value]}</li> 10 <li> {[name]} = {[value]}</li>
10 </xml>) 11 </xml>)
11 [M.fs] M.names values} 12 [M.fs] M.fl M.names values}
12 </body></xml> 13 </body></xml>
13 14
14 fun main () = return <xml><body> 15 fun main () = return <xml><body>
15 <form> 16 <form>
16 {foldUR [string] [fn cols :: {Unit} => xml form [] (mapUT string cols)] 17 {foldUR [string] [fn cols :: {Unit} => xml form [] (mapUT string cols)]
18 (acc : xml form [] (mapUT string rest)) => <xml> 19 (acc : xml form [] (mapUT string rest)) => <xml>
19 <li> {[name]}: <textbox{nm}/></li> 20 <li> {[name]}: <textbox{nm}/></li>
20 {useMore acc} 21 {useMore acc}
21 </xml>) 22 </xml>)
22 <xml/> 23 <xml/>
23 [M.fs] M.names} 24 [M.fs] M.fl M.names}
24 <submit action={handler}/> 25 <submit action={handler}/>
25 </form> 26 </form>
26 </body></xml> 27 </body></xml>
27 28
28 end 29 end