From 7765b90d25f98bd9eb0cf2998121e51d4551f733 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 22 Aug 2010 13:43:46 -0400 Subject: Reduce: Inline let-bound variables whose types involve functions --- src/especialize.sml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/especialize.sml') diff --git a/src/especialize.sml b/src/especialize.sml index 3fa3ea1d..a43652d0 100644 --- a/src/especialize.sml +++ b/src/especialize.sml @@ -127,6 +127,18 @@ structure SS = BinarySetFn(struct val mayNotSpec = ref SS.empty +val functionInside = U.Con.exists {kind = fn _ => false, + con = fn TFun _ => true + | CFfi ("Basis", "transaction") => true + | CFfi ("Basis", "eq") => true + | CFfi ("Basis", "num") => true + | CFfi ("Basis", "ord") => true + | CFfi ("Basis", "show") => true + | CFfi ("Basis", "read") => true + | CFfi ("Basis", "sql_injectable_prim") => true + | CFfi ("Basis", "sql_injectable") => true + | _ => false} + fun specialize' (funcs, specialized) file = let fun bind (env, b) = @@ -286,17 +298,6 @@ fun specialize' (funcs, specialized) file = (*val () = Print.prefaces "Consider" [("e", CorePrint.p_exp CoreEnv.empty (e, ErrorMsg.dummySpan))]*) - val functionInside = U.Con.exists {kind = fn _ => false, - con = fn TFun _ => true - | CFfi ("Basis", "transaction") => true - | CFfi ("Basis", "eq") => true - | CFfi ("Basis", "num") => true - | CFfi ("Basis", "ord") => true - | CFfi ("Basis", "show") => true - | CFfi ("Basis", "read") => true - | CFfi ("Basis", "sql_injectable_prim") => true - | CFfi ("Basis", "sql_injectable") => true - | _ => false} val loc = ErrorMsg.dummySpan fun findSplit av (xs, typ, fxs, fvs, fin) = -- cgit v1.2.3