# HG changeset patch # User Adam Chlipala # Date 1242920704 14400 # Node ID 066493f7f008a1ad6fffbcb58150c1b635c5aabc # Parent 4585f744574a872855dc0639d22cbfe28038c2c7 Change List.mapM' to avoid leaving functions around diff -r 4585f744574a -r 066493f7f008 lib/ur/list.ur --- a/lib/ur/list.ur Thu May 21 10:34:56 2009 -0400 +++ b/lib/ur/list.ur Thu May 21 11:45:04 2009 -0400 @@ -44,8 +44,8 @@ let fun mapM' acc ls = case ls of - [] => acc - | x :: ls => mapM' (x' <- f x; ls' <- acc; return (x' :: ls')) ls + [] => return (rev acc) + | x :: ls => x' <- f x; mapM' (x' :: acc) ls in - mapM' (return []) + mapM' [] end diff -r 4585f744574a -r 066493f7f008 src/especialize.sml --- a/src/especialize.sml Thu May 21 10:34:56 2009 -0400 +++ b/src/especialize.sml Thu May 21 11:45:04 2009 -0400 @@ -205,7 +205,10 @@ [("e'", CorePrint.p_exp CoreEnv.empty e)];*) (#1 e, st) end - | (_, true) => (e, st) + | (_, true) => ((*Print.prefaces ("No(" ^ name ^ ")") + [("fxs'", + Print.p_list (CorePrint.p_exp CoreEnv.empty) fxs')];*) + (e, st)) | (NONE, false) => let (*val () = Print.prefaces "New one" @@ -213,6 +216,10 @@ ("mns", Print.p_list Print.PD.string (SS.listItems (!mayNotSpec)))]*) + (*val () = Print.prefaces ("Yes(" ^ name ^ ")") + [("fxs'", + Print.p_list (CorePrint.p_exp CoreEnv.empty) fxs')]*) + fun subBody (body, typ, fxs') = case (#1 body, #1 typ, fxs') of (_, _, []) => SOME (body, typ) diff -r 4585f744574a -r 066493f7f008 src/monoize.sml --- a/src/monoize.sml Thu May 21 10:34:56 2009 -0400 +++ b/src/monoize.sml Thu May 21 11:45:04 2009 -0400 @@ -2538,9 +2538,7 @@ | "dyn" => (case attrs of - (*[("Signal", (L'.EApp ((L'.EAbs (_, _, _, (L'.ESignalReturn (L'.ERel 0, _), _)), _), - e), _), _)] => (e, fm) - |*) [("Signal", e, _)] => + [("Signal", e, _)] => ((L'.EStrcat ((L'.EPrim (Prim.String "