diff src/corify.sml @ 102:5f04adf47f48

Writing HTML
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 14:02:54 -0400
parents f0f59e918cac
children 813e5a52063d
line wrap: on
line diff
--- a/src/corify.sml	Thu Jul 10 11:13:49 2008 -0400
+++ b/src/corify.sml	Thu Jul 10 14:02:54 2008 -0400
@@ -427,7 +427,19 @@
              end
            | _ => raise Fail "Non-const signature for FFI structure")
 
-      | L.DPage (c, e) => ([(L'.DPage (corifyCon st c, corifyExp st e), loc)], st)
+      | L.DPage (c, e) =>
+        let
+            val c = corifyCon st c
+            val e = corifyExp st e
+
+            val dom = (L'.TRecord c, loc)
+            val ran = (L'.TRecord (L'.CRecord ((L'.KType, loc), []), loc), loc)
+            val e = (L'.EAbs ("vs", dom, ran,
+                              (L'.EWrite (L'.EApp (e, (L'.ERel 0, loc)), loc), loc)), loc)
+                                                                
+        in
+            ([(L'.DPage (c, e), loc)], st)
+        end
 
 and corifyStr ((str, _), st) =
     case str of