diff src/urweb.grm @ 724:12ec14a6be0b

<link>
author Adam Chlipala <adamc@hcoop.net>
date Thu, 16 Apr 2009 12:00:44 -0400
parents 9864b64b1700
children 2c7244c066f1
line wrap: on
line diff
--- a/src/urweb.grm	Mon Apr 13 08:44:32 2009 -0400
+++ b/src/urweb.grm	Thu Apr 16 12:00:44 2009 -0400
@@ -1308,19 +1308,26 @@
 attr   : SYMBOL EQ attrv                (if SYMBOL = "class" then
                                              Class attrv
                                          else
-                                             Normal ((CName (capitalize SYMBOL), s (SYMBOLleft, SYMBOLright)),
-                                                     if (SYMBOL = "href" orelse SYMBOL = "src")
-                                                        andalso (case #1 attrv of
-                                                                     EPrim _ => true
-                                                                   | _ => false) then
-                                                         let
-                                                             val loc = s (attrvleft, attrvright)
-                                                         in
-                                                             (EApp ((EVar (["Basis"], "bless", Infer), loc),
-                                                                    attrv), loc)
-                                                         end
-                                                     else
-                                                         attrv))
+                                             let
+                                                 val sym =
+                                                     case SYMBOL of
+                                                         "type" => "Typ"
+                                                       | x => capitalize x
+                                             in
+                                                 Normal ((CName sym, s (SYMBOLleft, SYMBOLright)),
+                                                         if (sym = "Href" orelse sym = "Src")
+                                                            andalso (case #1 attrv of
+                                                                         EPrim _ => true
+                                                                       | _ => false) then
+                                                             let
+                                                                 val loc = s (attrvleft, attrvright)
+                                                             in
+                                                                 (EApp ((EVar (["Basis"], "bless", Infer), loc),
+                                                                        attrv), loc)
+                                                             end
+                                                         else
+                                                             attrv)
+                                             end)
                 
 attrv  : INT                            (EPrim (Prim.Int INT), s (INTleft, INTright))
        | FLOAT                          (EPrim (Prim.Float FLOAT), s (FLOATleft, FLOATright))