comparison src/elab_util.sml @ 720:acb8537f58f0

Stop tracking CSS classes in XML types
author Adam Chlipala <adamc@hcoop.net>
date Sun, 12 Apr 2009 12:31:54 -0400
parents f152f215a02c
children 8688e01ae469
comparison
equal deleted inserted replaced
719:5c099b1308ae 720:acb8537f58f0
795 bind (ctx, NamedC (x, n, (KArrow (k, (KType, loc)), loc))) 795 bind (ctx, NamedC (x, n, (KArrow (k, (KType, loc)), loc)))
796 | DDatabase _ => ctx 796 | DDatabase _ => ctx
797 | DCookie (tn, x, n, c) => 797 | DCookie (tn, x, n, c) =>
798 bind (ctx, NamedE (x, (CApp ((CModProj (n, [], "cookie"), loc), 798 bind (ctx, NamedE (x, (CApp ((CModProj (n, [], "cookie"), loc),
799 c), loc))) 799 c), loc)))
800 | DStyle (tn, x, n, c) => 800 | DStyle (tn, x, n) =>
801 bind (ctx, NamedE (x, (CApp ((CModProj (n, [], "css_class"), loc), 801 bind (ctx, NamedE (x, (CModProj (n, [], "css_class"), loc))),
802 c), loc))),
803 mfd ctx d)) ctx ds, 802 mfd ctx d)) ctx ds,
804 fn ds' => (StrConst ds', loc)) 803 fn ds' => (StrConst ds', loc))
805 | StrVar _ => S.return2 strAll 804 | StrVar _ => S.return2 strAll
806 | StrProj (str, x) => 805 | StrProj (str, x) =>
807 S.map2 (mfst ctx str, 806 S.map2 (mfst ctx str,
912 911
913 | DCookie (tn, x, n, c) => 912 | DCookie (tn, x, n, c) =>
914 S.map2 (mfc ctx c, 913 S.map2 (mfc ctx c,
915 fn c' => 914 fn c' =>
916 (DCookie (tn, x, n, c'), loc)) 915 (DCookie (tn, x, n, c'), loc))
917 | DStyle (tn, x, n, c) => 916 | DStyle _ => S.return2 dAll
918 S.map2 (mfc ctx c,
919 fn c' =>
920 (DStyle (tn, x, n, c'), loc))
921 917
922 and mfvi ctx (x, n, c, e) = 918 and mfvi ctx (x, n, c, e) =
923 S.bind2 (mfc ctx c, 919 S.bind2 (mfc ctx c,
924 fn c' => 920 fn c' =>
925 S.map2 (mfe ctx e, 921 S.map2 (mfe ctx e,
1055 | DExport _ => 0 1051 | DExport _ => 0
1056 | DTable (n1, _, n2, _, _, _, _, _) => Int.max (n1, n2) 1052 | DTable (n1, _, n2, _, _, _, _, _) => Int.max (n1, n2)
1057 | DSequence (n1, _, n2) => Int.max (n1, n2) 1053 | DSequence (n1, _, n2) => Int.max (n1, n2)
1058 | DDatabase _ => 0 1054 | DDatabase _ => 0
1059 | DCookie (n1, _, n2, _) => Int.max (n1, n2) 1055 | DCookie (n1, _, n2, _) => Int.max (n1, n2)
1060 | DStyle (n1, _, n2, _) => Int.max (n1, n2) 1056 | DStyle (n1, _, n2) => Int.max (n1, n2)
1061
1062 and maxNameStr (str, _) = 1057 and maxNameStr (str, _) =
1063 case str of 1058 case str of
1064 StrConst ds => maxName ds 1059 StrConst ds => maxName ds
1065 | StrVar n => n 1060 | StrVar n => n
1066 | StrProj (str, _) => maxNameStr str 1061 | StrProj (str, _) => maxNameStr str