summaryrefslogtreecommitdiff
path: root/src/especialize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-08-22 13:43:46 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2010-08-22 13:43:46 -0400
commit7765b90d25f98bd9eb0cf2998121e51d4551f733 (patch)
treed081f569cf52ee803d96962b25ab35f828c696df /src/especialize.sml
parent1bd7feb39add77e14df852d2087902049f2b5df3 (diff)
Reduce: Inline let-bound variables whose types involve functions
Diffstat (limited to 'src/especialize.sml')
-rw-r--r--src/especialize.sml23
1 files changed, 12 insertions, 11 deletions
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) =