diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-04-16 12:00:44 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-04-16 12:00:44 -0400 |
commit | 1841386c2ad439363d735acc0550c495e040d217 (patch) | |
tree | ceb56cba54a598fb80b02bc10a82b394c3aa3a06 /src | |
parent | f03c559d279c0026be2aa781fdef26ea9d5298b5 (diff) |
<link>
Diffstat (limited to 'src')
-rw-r--r-- | src/monoize.sml | 4 | ||||
-rw-r--r-- | src/urweb.grm | 33 |
2 files changed, 24 insertions, 13 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index 51fae113..3fd4f730 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -2168,6 +2168,10 @@ fun monoExp (env, st, fm) (all as (e, loc)) = | "Action" => urlifyExp | _ => attrifyExp + val x = + case x of + "Typ" => "Type" + | _ => x val xp = " " ^ lowercaseFirst x ^ "=\"" val (e, fm) = fooify env fm (e, t) 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)) |