diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-04-09 16:36:50 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-04-09 16:36:50 -0400 |
commit | 17cb59d373d1a94731d3730b938776b524d9f81c (patch) | |
tree | 3942a2b3cfdab76d585ffaea82462831d241d351 /src/monoize.sml | |
parent | f48c39b31e2d82b1ef7da1aae7d0c555d26d3101 (diff) |
URLs
Diffstat (limited to 'src/monoize.sml')
-rw-r--r-- | src/monoize.sml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index 950de1e1..bf26fda2 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -126,6 +126,7 @@ fun monoType env = | L.CApp ((L.CFfi ("Basis", "read"), _), t) => readType (mt env dtmap t, loc) + | L.CFfi ("Basis", "url") => (L'.TFfi ("Basis", "string"), loc) | L.CApp ((L.CApp ((L.CApp ((L.CFfi ("Basis", "xml"), _), _), _), _), _), _) => (L'.TFfi ("Basis", "string"), loc) | L.CApp ((L.CApp ((L.CFfi ("Basis", "xhtml"), _), _), _), _) => @@ -2075,6 +2076,14 @@ fun monoExp (env, st, fm) (all as (e, loc)) = L'.ERecord xes => xes | _ => raise Fail "Non-record attributes!" + val attrs = + if List.exists (fn ("Link", _, _) => true + | _ => false) attrs then + List.filter (fn ("Href", _, _) => false + | _ => true) attrs + else + attrs + fun findOnload (attrs, acc) = case attrs of [] => (NONE, acc) @@ -2137,8 +2146,8 @@ fun monoExp (env, st, fm) (all as (e, loc)) = let val fooify = case x of - "Href" => urlifyExp - | "Link" => urlifyExp + "Link" => urlifyExp + | "Action" => urlifyExp | _ => attrifyExp val xp = " " ^ lowercaseFirst x ^ "=\"" |