comparison src/especialize.sml @ 818:066493f7f008

Change List.mapM' to avoid leaving functions around
author Adam Chlipala <adamc@hcoop.net>
date Thu, 21 May 2009 11:45:04 -0400
parents ef6de4075dc1
children a3273bee05a9
comparison
equal deleted inserted replaced
817:4585f744574a 818:066493f7f008
203 in 203 in
204 (*Print.prefaces "Brand new (reuse)" 204 (*Print.prefaces "Brand new (reuse)"
205 [("e'", CorePrint.p_exp CoreEnv.empty e)];*) 205 [("e'", CorePrint.p_exp CoreEnv.empty e)];*)
206 (#1 e, st) 206 (#1 e, st)
207 end 207 end
208 | (_, true) => (e, st) 208 | (_, true) => ((*Print.prefaces ("No(" ^ name ^ ")")
209 [("fxs'",
210 Print.p_list (CorePrint.p_exp CoreEnv.empty) fxs')];*)
211 (e, st))
209 | (NONE, false) => 212 | (NONE, false) =>
210 let 213 let
211 (*val () = Print.prefaces "New one" 214 (*val () = Print.prefaces "New one"
212 [("f", Print.PD.string (Int.toString f)), 215 [("f", Print.PD.string (Int.toString f)),
213 ("mns", Print.p_list Print.PD.string 216 ("mns", Print.p_list Print.PD.string
214 (SS.listItems (!mayNotSpec)))]*) 217 (SS.listItems (!mayNotSpec)))]*)
218
219 (*val () = Print.prefaces ("Yes(" ^ name ^ ")")
220 [("fxs'",
221 Print.p_list (CorePrint.p_exp CoreEnv.empty) fxs')]*)
215 222
216 fun subBody (body, typ, fxs') = 223 fun subBody (body, typ, fxs') =
217 case (#1 body, #1 typ, fxs') of 224 case (#1 body, #1 typ, fxs') of
218 (_, _, []) => SOME (body, typ) 225 (_, _, []) => SOME (body, typ)
219 | (EAbs (_, _, _, body'), TFun (_, typ'), x :: fxs'') => 226 | (EAbs (_, _, _, body'), TFun (_, typ'), x :: fxs'') =>