Mercurial > urweb
diff src/unpoly.sml @ 1016:065ce3252090
Inlining threshold for Reduce
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 25 Oct 2009 12:08:21 -0400 |
parents | 6271f0e3c272 |
children | 85d194409b17 |
line wrap: on
line diff
--- a/src/unpoly.sml Sun Oct 25 11:03:42 2009 -0400 +++ b/src/unpoly.sml Sun Oct 25 12:08:21 2009 -0400 @@ -162,12 +162,19 @@ val vis' = map (fn (x, n, _, t, e, s) => (x, n, t, e, s)) vis - val funcs = IM.insert (#funcs st, n, - {kinds = ks, - defs = old_vis, - replacements = M.insert (replacements, - cargs, - thisName)}) + val funcs = foldl (fn ((_, n, n_old, _, _, _), funcs) => + let + val replacements = case IM.find (funcs, n_old) of + NONE => M.empty + | SOME {replacements = r, ...} => r + in + IM.insert (funcs, n_old, + {kinds = ks, + defs = old_vis, + replacements = M.insert (replacements, + cargs, + n)}) + end) (#funcs st) vis val ks' = List.drop (ks, length cargs)