diff src/urweb.grm @ 710:71409a4ccb67

Get demo type-inferring again
author Adam Chlipala <adamc@hcoop.net>
date Tue, 07 Apr 2009 20:38:01 -0400
parents 0406e9cccb72
children 7292bcb7c02d
line wrap: on
line diff
--- a/src/urweb.grm	Tue Apr 07 18:47:47 2009 -0400
+++ b/src/urweb.grm	Tue Apr 07 20:38:01 2009 -0400
@@ -1204,11 +1204,23 @@
                                          s (NOTAGSleft, NOTAGSright))
        | tag DIVIDE GT                  (let
                                              val pos = s (tagleft, GTright)
+
+                                             val cdata =
+                                                 if #1 tag = "submit" orelse #1 tag = "dyn" then
+                                                     let
+                                                         val e = (EVar (["Basis"], "cdata", DontInfer), pos)
+                                                         val e = (ECApp (e, (CWild (KWild, pos), pos)), pos)
+                                                     in
+                                                         (ECApp (e, (CRecord [], pos)), pos)
+                                                     end
+                                                 else
+                                                     (EVar (["Basis"], "cdata", Infer), pos)
+
+                                             val cdata = (EApp (cdata,
+                                                                (EPrim (Prim.String ""), pos)),
+                                                          pos)
                                          in
-                                             (EApp (#2 tag,
-                                                    (EApp ((EVar (["Basis"], "cdata", Infer), pos),
-                                                           (EPrim (Prim.String ""), pos)),
-                                                     pos)), pos)
+                                             (EApp (#2 tag, cdata), pos)
                                          end)
          
        | tag GT xml END_TAG             (let