summaryrefslogtreecommitdiff
path: root/src/urweb.grm
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-16 12:00:44 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-16 12:00:44 -0400
commit7a0e04de1fd3d0e72deb4c78367a6894ef6e4396 (patch)
treeceb56cba54a598fb80b02bc10a82b394c3aa3a06 /src/urweb.grm
parent363b43b25df5ab03b7954a421a00303668eea7eb (diff)
<link>
Diffstat (limited to 'src/urweb.grm')
-rw-r--r--src/urweb.grm33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index d47aaf47..50d0c803 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -1308,19 +1308,26 @@ attrs : (NONE, [])
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))