From: simonmar Date: Fri, 3 May 2002 11:25:58 +0000 (+0000) Subject: [project @ 2002-05-03 11:25:58 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2057 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8288caf065f2a73dc8987b23c5c5a5e2852d23be;p=ghc-hetmet.git [project @ 2002-05-03 11:25:58 by simonmar] seqList the result of mkImportInfo: this fixes a space leak whereby the entire collection of Ifaces read by the renamer were being held on to during the core-to-core phases. --- diff --git a/ghc/compiler/rename/RnIfaces.lhs b/ghc/compiler/rename/RnIfaces.lhs index 335d5b9..c591bb3 100644 --- a/ghc/compiler/rename/RnIfaces.lhs +++ b/ghc/compiler/rename/RnIfaces.lhs @@ -59,7 +59,7 @@ import Maybe ( isJust ) import FiniteMap import Outputable import Bag -import Util ( sortLt ) +import Util ( sortLt, seqList ) \end{code} @@ -242,7 +242,11 @@ mkImportInfo this_mod imports maybe_export_vers | import_all_mod = Just (vers_exports version_info) | otherwise = Nothing in - returnRn import_info + + -- seq the list of ImportVersions returned: occasionally these + -- don't get evaluated for a while and we can end up hanging on to + -- the entire collection of Ifaces. + seqList import_info (returnRn import_info) \end{code} %*********************************************************