summaryrefslogtreecommitdiff
path: root/src/urweb.grm
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 20:38:01 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 20:38:01 -0400
commitbbe4225bd2c99d8f3e279911dd0b52bbd2281646 (patch)
tree27b25c9e8b68ae517100138ad652c03e538ddb05 /src/urweb.grm
parentf7c62ce8111cf0f31d65fb62b16e040fbfae0972 (diff)
Get demo type-inferring again
Diffstat (limited to 'src/urweb.grm')
-rw-r--r--src/urweb.grm20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index 5539feff..fb31bd18 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -1204,11 +1204,23 @@ xmlOne : NOTAGS (EApp ((EVar (["Basis"], "cdata", Infer)
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