comparison src/monoize.sml @ 1749:f9e5a8e09cdf

Simplify type of Basis.tag, regarding 'class' attribute; new compatibility parsing of 'class' values given as string literals
author Adam Chlipala <adam@chlipala.net>
date Sun, 06 May 2012 13:07:13 -0400
parents d2b3fada532e
children 277480862cef
comparison
equal deleted inserted replaced
1748:95dd9f427bb2 1749:f9e5a8e09cdf
3075 let 3075 let
3076 val t = (L'.TFfi ("Basis", "string"), loc) 3076 val t = (L'.TFfi ("Basis", "string"), loc)
3077 val s = (L'.EPrim (Prim.String (String.concat ["<", tag'])), loc) 3077 val s = (L'.EPrim (Prim.String (String.concat ["<", tag'])), loc)
3078 3078
3079 val s = (L'.ECase (class, 3079 val s = (L'.ECase (class,
3080 [((L'.PNone t, loc), 3080 [((L'.PPrim (Prim.String ""), loc),
3081 s), 3081 s),
3082 ((L'.PSome (t, (L'.PVar ("x", t), loc)), loc), 3082 ((L'.PVar ("x", t), loc),
3083 (L'.EStrcat (s, 3083 (L'.EStrcat (s,
3084 (L'.EStrcat ((L'.EPrim (Prim.String " class=\""), loc), 3084 (L'.EStrcat ((L'.EPrim (Prim.String " class=\""), loc),
3085 (L'.EStrcat ((L'.ERel 0, loc), 3085 (L'.EStrcat ((L'.ERel 0, loc),
3086 (L'.EPrim (Prim.String "\""), loc)), 3086 (L'.EPrim (Prim.String "\""), loc)),
3087 loc)), loc)), loc))], 3087 loc)), loc)), loc))],
3088 {disc = (L'.TOption t, loc), 3088 {disc = t,
3089 result = t}), loc) 3089 result = t}), loc)
3090 3090
3091 val (s, fm) = foldl (fn (("Action", _, _), acc) => acc 3091 val (s, fm) = foldl (fn (("Action", _, _), acc) => acc
3092 | (("Source", _, _), acc) => acc 3092 | (("Source", _, _), acc) => acc
3093 | ((x, e, t), (s, fm)) => 3093 | ((x, e, t), (s, fm)) =>