comparison tests/gform.lac @ 146:80ac94b54e41

Fix opening and corifying of functors
author Adam Chlipala <adamc@hcoop.net>
date Tue, 22 Jul 2008 18:20:13 -0400
parents
children eb16f2aadbe9
comparison
equal deleted inserted replaced
145:b1b33f7cf555 146:80ac94b54e41
1 con stringify = fold (fn nm :: Name => fn u :: Unit => fn t :: {Type} => [nm = string] ++ t) []
2
3 signature S = sig
4 con rs :: {Unit}
5 end
6
7 signature S' = sig
8 con rs :: {Unit}
9
10 val handler : $(stringify rs) -> page
11 val page : unit -> page
12 end
13
14 functor F (M : S) : S' where con rs = M.rs = struct
15 con rs = M.rs
16
17 val handler = fn x : $(stringify M.rs) => <html><body>
18 OK.
19 </body></html>
20
21 val page = fn () => <html><body>
22
23 </body></html>
24 end
25
26 structure M = F(struct
27 con rs = []
28 end)
29
30 open M
31