Mercurial > urweb
diff src/especialize.sml @ 522:3162bbf8e30f
Avoid Especializing polymorphic code
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 27 Nov 2008 12:43:28 -0500 |
parents | 31aba58a5b5b |
children | 230654093b51 |
line wrap: on
line diff
--- a/src/especialize.sml Thu Nov 27 12:34:44 2008 -0500 +++ b/src/especialize.sml Thu Nov 27 12:43:28 2008 -0500 @@ -59,6 +59,12 @@ | _ => bound} 0 IS.empty +val isPoly = U.Decl.exists {kind = fn _ => false, + con = fn _ => false, + exp = fn ECAbs _ => true + | _ => false, + decl = fn _ => false} + fun positionOf (v : int, ls) = let fun pof (pos, ls) = @@ -302,7 +308,11 @@ (*val () = Print.prefaces "decl" [("d", CorePrint.p_decl CoreEnv.empty d)]*) - val (d', st) = specDecl [] st d + val (d', st) = + if isPoly d then + (d, st) + else + specDecl [] st d (*val () = print "/decl\n"*)