Mercurial > urweb
comparison src/monoize.sml @ 718:f152f215a02c
style declarations
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 12 Apr 2009 10:08:11 -0400 |
parents | e28637743279 |
children | 5c099b1308ae |
comparison
equal
deleted
inserted
replaced
717:e28637743279 | 718:f152f215a02c |
---|---|
2703 in | 2703 in |
2704 SOME (Env.pushENamed env x n t NONE s, | 2704 SOME (Env.pushENamed env x n t NONE s, |
2705 fm, | 2705 fm, |
2706 [(L'.DVal (x, n, t', e, s), loc)]) | 2706 [(L'.DVal (x, n, t', e, s), loc)]) |
2707 end | 2707 end |
2708 | L.DStyle (x, n, (L.CRecord (_, xcs), _), s) => | |
2709 let | |
2710 val xs = map (fn ((L.CName x, _), _) => x | |
2711 | (x, _) => (E.errorAt (#2 x) "Undetermined style component"; | |
2712 Print.eprefaces' [("Name", CorePrint.p_con env x)]; | |
2713 "")) xcs | |
2714 | |
2715 val t = (L.CFfi ("Basis", "string"), loc) | |
2716 val t' = (L'.TFfi ("Basis", "string"), loc) | |
2717 val e = (L'.EPrim (Prim.String s), loc) | |
2718 in | |
2719 SOME (Env.pushENamed env x n t NONE s, | |
2720 fm, | |
2721 [(L'.DStyle (s, xs), loc), | |
2722 (L'.DVal (x, n, t', e, s), loc)]) | |
2723 end | |
2724 | L.DStyle _ => poly () | |
2708 end | 2725 end |
2709 | 2726 |
2710 datatype expungable = Client | Channel | 2727 datatype expungable = Client | Channel |
2711 | 2728 |
2712 fun monoize env file = | 2729 fun monoize env file = |