diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/gform.lac	Tue Jul 22 18:20:13 2008 -0400
@@ -0,0 +1,31 @@
+con stringify = fold (fn nm :: Name => fn u :: Unit => fn t :: {Type} => [nm = string] ++ t) []
+
+signature S = sig
+        con rs :: {Unit}
+end
+
+signature S' = sig
+        con rs :: {Unit}
+
+        val handler : $(stringify rs) -> page
+        val page : unit -> page
+end
+
+functor F (M : S) : S' where con rs = M.rs = struct
+        con rs = M.rs
+
+        val handler = fn x : $(stringify M.rs) => <html><body>
+                OK.
+        </body></html>
+
+        val page = fn () => <html><body>
+
+        </body></html>
+end
+
+structure M = F(struct
+        con rs = []
+end)
+
+open M
+