From 8288caf065f2a73dc8987b23c5c5a5e2852d23be Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 3 May 2002 11:25:58 +0000 Subject: [PATCH] [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. --- ghc/compiler/rename/RnIfaces.lhs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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} %********************************************************* -- 1.7.10.4