comparison 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
comparison
equal deleted inserted replaced
709:0406e9cccb72 710:71409a4ccb67
1202 xmlOne : NOTAGS (EApp ((EVar (["Basis"], "cdata", Infer), s (NOTAGSleft, NOTAGSright)), 1202 xmlOne : NOTAGS (EApp ((EVar (["Basis"], "cdata", Infer), s (NOTAGSleft, NOTAGSright)),
1203 (EPrim (Prim.String NOTAGS), s (NOTAGSleft, NOTAGSright))), 1203 (EPrim (Prim.String NOTAGS), s (NOTAGSleft, NOTAGSright))),
1204 s (NOTAGSleft, NOTAGSright)) 1204 s (NOTAGSleft, NOTAGSright))
1205 | tag DIVIDE GT (let 1205 | tag DIVIDE GT (let
1206 val pos = s (tagleft, GTright) 1206 val pos = s (tagleft, GTright)
1207 in 1207
1208 (EApp (#2 tag, 1208 val cdata =
1209 (EApp ((EVar (["Basis"], "cdata", Infer), pos), 1209 if #1 tag = "submit" orelse #1 tag = "dyn" then
1210 (EPrim (Prim.String ""), pos)), 1210 let
1211 pos)), pos) 1211 val e = (EVar (["Basis"], "cdata", DontInfer), pos)
1212 val e = (ECApp (e, (CWild (KWild, pos), pos)), pos)
1213 in
1214 (ECApp (e, (CRecord [], pos)), pos)
1215 end
1216 else
1217 (EVar (["Basis"], "cdata", Infer), pos)
1218
1219 val cdata = (EApp (cdata,
1220 (EPrim (Prim.String ""), pos)),
1221 pos)
1222 in
1223 (EApp (#2 tag, cdata), pos)
1212 end) 1224 end)
1213 1225
1214 | tag GT xml END_TAG (let 1226 | tag GT xml END_TAG (let
1215 val pos = s (tagleft, GTright) 1227 val pos = s (tagleft, GTright)
1216 val et = tagIn END_TAG 1228 val et = tagIn END_TAG