Mercurial > urweb
comparison src/elab_util.sml @ 1254:935a981f4380
Merge
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 06 May 2010 13:57:01 -0400 |
parents | c316ca3c9ec6 |
children | 56bd4a4f6e66 |
comparison
equal
deleted
inserted
replaced
1198:b52929351402 | 1254:935a981f4380 |
---|---|
852 | DCookie (tn, x, n, c) => | 852 | DCookie (tn, x, n, c) => |
853 bind (ctx, NamedE (x, (CApp ((CModProj (n, [], "cookie"), loc), | 853 bind (ctx, NamedE (x, (CApp ((CModProj (n, [], "cookie"), loc), |
854 c), loc))) | 854 c), loc))) |
855 | DStyle (tn, x, n) => | 855 | DStyle (tn, x, n) => |
856 bind (ctx, NamedE (x, (CModProj (n, [], "css_class"), loc))) | 856 bind (ctx, NamedE (x, (CModProj (n, [], "css_class"), loc))) |
857 | DTask _ => ctx, | 857 | DTask _ => ctx |
858 | DPolicy _ => ctx, | |
858 mfd ctx d)) ctx ds, | 859 mfd ctx d)) ctx ds, |
859 fn ds' => (StrConst ds', loc)) | 860 fn ds' => (StrConst ds', loc)) |
860 | StrVar _ => S.return2 strAll | 861 | StrVar _ => S.return2 strAll |
861 | StrProj (str, x) => | 862 | StrProj (str, x) => |
862 S.map2 (mfst ctx str, | 863 S.map2 (mfst ctx str, |
983 S.bind2 (mfe ctx e1, | 984 S.bind2 (mfe ctx e1, |
984 fn e1' => | 985 fn e1' => |
985 S.map2 (mfe ctx e2, | 986 S.map2 (mfe ctx e2, |
986 fn e2' => | 987 fn e2' => |
987 (DTask (e1', e2'), loc))) | 988 (DTask (e1', e2'), loc))) |
989 | DPolicy e1 => | |
990 S.map2 (mfe ctx e1, | |
991 fn e1' => | |
992 (DPolicy e1', loc)) | |
988 | 993 |
989 and mfvi ctx (x, n, c, e) = | 994 and mfvi ctx (x, n, c, e) = |
990 S.bind2 (mfc ctx c, | 995 S.bind2 (mfc ctx c, |
991 fn c' => | 996 fn c' => |
992 S.map2 (mfe ctx e, | 997 S.map2 (mfe ctx e, |
1126 | DView (n1, _, n2, _, _) => Int.max (n1, n2) | 1131 | DView (n1, _, n2, _, _) => Int.max (n1, n2) |
1127 | DDatabase _ => 0 | 1132 | DDatabase _ => 0 |
1128 | DCookie (n1, _, n2, _) => Int.max (n1, n2) | 1133 | DCookie (n1, _, n2, _) => Int.max (n1, n2) |
1129 | DStyle (n1, _, n2) => Int.max (n1, n2) | 1134 | DStyle (n1, _, n2) => Int.max (n1, n2) |
1130 | DTask _ => 0 | 1135 | DTask _ => 0 |
1136 | DPolicy _ => 0 | |
1131 and maxNameStr (str, _) = | 1137 and maxNameStr (str, _) = |
1132 case str of | 1138 case str of |
1133 StrConst ds => maxName ds | 1139 StrConst ds => maxName ds |
1134 | StrVar n => n | 1140 | StrVar n => n |
1135 | StrProj (str, _) => maxNameStr str | 1141 | StrProj (str, _) => maxNameStr str |