comparison demo/metaform.ur @ 1093:8d3aa6c7cee0

Make summary unification more conservative; infer implicit arguments after applications
author Adam Chlipala <adamc@hcoop.net>
date Sat, 26 Dec 2009 11:56:40 -0500
parents 669ac5e9a69e
children 51e596feec37
comparison
equal deleted inserted replaced
1092:6f4b05fc4361 1093:8d3aa6c7cee0
3 val fl : folder fs 3 val fl : folder fs
4 val names : $(mapU string fs) 4 val names : $(mapU string fs)
5 end) = struct 5 end) = struct
6 6
7 fun handler values = return <xml><body> 7 fun handler values = return <xml><body>
8 {foldURX2 [string] [string] [body] 8 {@foldURX2 [string] [string] [body]
9 (fn [nm :: Name] [rest :: {Unit}] [[nm] ~ rest] name value => <xml> 9 (fn [nm :: Name] [rest :: {Unit}] [[nm] ~ rest] name value => <xml>
10 <li> {[name]} = {[value]}</li> 10 <li> {[name]} = {[value]}</li>
11 </xml>) 11 </xml>)
12 [M.fs] M.fl M.names values} 12 M.fl M.names values}
13 </body></xml> 13 </body></xml>
14 14
15 fun main () = return <xml><body> 15 fun main () = return <xml><body>
16 <form> 16 <form>
17 {foldUR [string] [fn cols :: {Unit} => xml form [] (mapU string cols)] 17 {@foldUR [string] [fn cols :: {Unit} => xml form [] (mapU string cols)]
18 (fn [nm :: Name] [rest :: {Unit}] [[nm] ~ rest] name 18 (fn [nm :: Name] [rest :: {Unit}] [[nm] ~ rest] name
19 (acc : xml form [] (mapU string rest)) => <xml> 19 (acc : xml form [] (mapU string rest)) => <xml>
20 <li> {[name]}: <textbox{nm}/></li> 20 <li> {[name]}: <textbox{nm}/></li>
21 {useMore acc} 21 {useMore acc}
22 </xml>) 22 </xml>)
23 <xml/> 23 <xml/>
24 [M.fs] M.fl M.names} 24 M.fl M.names}
25 <submit action={handler}/> 25 <submit action={handler}/>
26 </form> 26 </form>
27 </body></xml> 27 </body></xml>
28 28
29 end 29 end