[project @ 2002-05-03 11:25:58 by simonmar]
authorsimonmar <unknown>
Fri, 3 May 2002 11:25:58 +0000 (11:25 +0000)
committersimonmar <unknown>
Fri, 3 May 2002 11:25:58 +0000 (11:25 +0000)
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

index 335d5b9..c591bb3 100644 (file)
@@ -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}
 
 %*********************************************************