Mercurial > urweb
diff src/especialize.sml @ 1289:3b22c3c67f35
Reduce: Inline let-bound variables whose types involve functions
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 22 Aug 2010 13:43:46 -0400 |
parents | 56bd4a4f6e66 |
children | 6c2e565adca6 |
line wrap: on
line diff
--- a/src/especialize.sml Sat Aug 21 10:58:13 2010 -0400 +++ b/src/especialize.sml Sun Aug 22 13:43:46 2010 -0400 @@ -127,6 +127,18 @@ 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 @@ (*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) =