summaryrefslogtreecommitdiff
path: root/src/monoize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-12 10:08:11 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-12 10:08:11 -0400
commit30eeaff2c92fb1d0ba029a7688fc7b547a60c150 (patch)
treea661373caf0683dea44543b9997278159a574d1b /src/monoize.sml
parent17cb59d373d1a94731d3730b938776b524d9f81c (diff)
style declarations
Diffstat (limited to 'src/monoize.sml')
-rw-r--r--src/monoize.sml17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index bf26fda2..8030b7ba 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -2705,6 +2705,23 @@ fun monoDecl (env, fm) (all as (d, loc)) =
fm,
[(L'.DVal (x, n, t', e, s), loc)])
end
+ | L.DStyle (x, n, (L.CRecord (_, xcs), _), s) =>
+ let
+ val xs = map (fn ((L.CName x, _), _) => x
+ | (x, _) => (E.errorAt (#2 x) "Undetermined style component";
+ Print.eprefaces' [("Name", CorePrint.p_con env x)];
+ "")) xcs
+
+ val t = (L.CFfi ("Basis", "string"), loc)
+ val t' = (L'.TFfi ("Basis", "string"), loc)
+ val e = (L'.EPrim (Prim.String s), loc)
+ in
+ SOME (Env.pushENamed env x n t NONE s,
+ fm,
+ [(L'.DStyle (s, xs), loc),
+ (L'.DVal (x, n, t', e, s), loc)])
+ end
+ | L.DStyle _ => poly ()
end
datatype expungable = Client | Channel