# HG changeset patch # User Adam Chlipala # Date 1325356260 18000 # Node ID dfc854e478bb5695df5ae6d5d5c11f9142cdd1be # Parent 1bfd793e7eb89cb11b2c51127834835cb882fac6 Error messages about applying 'dynClass' to tags that don't like it diff -r 1bfd793e7eb8 -r dfc854e478bb src/monoize.sml --- a/src/monoize.sml Thu Dec 29 16:08:34 2011 -0500 +++ b/src/monoize.sml Sat Dec 31 13:31:00 2011 -0500 @@ -3034,6 +3034,15 @@ val (class, fm) = monoExp (env, st, fm) class val (dynClass, fm) = monoExp (env, st, fm) dynClass + val dynamics = ["dyn", "ctextbox", "ccheckbox", "cselect", "coption", "ctextarea"] + + val () = case #1 dynClass of + L'.ENone _ => () + | _ => if List.exists (fn x => x = tag) dynamics then + E.errorAt loc ("Dynamic tag <" ^ tag ^ "> cannot be combined with 'dynClass' attribute; an additional may be useful") + else + () + fun tagStart tag' = let val t = (L'.TFfi ("Basis", "string"), loc) diff -r 1bfd793e7eb8 -r dfc854e478bb src/urweb.grm --- a/src/urweb.grm Thu Dec 29 16:08:34 2011 -0500 +++ b/src/urweb.grm Sat Dec 31 13:31:00 2011 -0500 @@ -1462,6 +1462,9 @@ NONE => (EVar (["Basis"], "None", Infer), pos) | SOME c => (EApp ((EVar (["Basis"], "Some", Infer), pos), c), pos)), pos) in + case #3 tag of + NONE => () + | SOME _ => ErrorMsg.errorAt pos "
does not support 'dynClass' attribute"; (EApp (e, xmlOpt), pos) end else if et = "subform" orelse et = "subforms" then