From: simonmar Date: Fri, 3 May 2002 11:23:41 +0000 (+0000) Subject: [project @ 2002-05-03 11:23:41 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2058 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=bf841911aadf9b5d55fe4305791449d67b5c1c89;p=ghc-hetmet.git [project @ 2002-05-03 11:23:41 by simonmar] I fluffed the seqList call in the previous revision, so it wasn't actually doing anything. I've verified that fixing it properly *does* remove a space leak. --- diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 5d6f457..b3c1450 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -231,13 +231,13 @@ hscRecomp ghci_mode dflags have_object filter (/= gHC_PRIM_Name) $ map ideclName (hsModuleImports rdr_module); - imported_modules = + imported_modules = map (moduleNameToModule hit (pcs_PIT pcs_tc)) imported_module_names; } -- force this out now, so we don't keep a hold of rdr_module or pcs_tc - ; seqList imported_modules `seq` return () + ; seqList imported_modules (return ()) ------------------- -- FLATTENING @@ -261,12 +261,20 @@ hscRecomp ghci_mode dflags have_object pcs_rules = rules } else return pcs_tc +-- Should we remove bits of flat_details at this point? +-- ; flat_details <- case flat_details of +-- ModDetails { md_binds = binds } -> +-- return ModDetails { md_binds = binds, +-- md_rules = [], +-- md_types = emptyTypeEnv, +-- md_insts = [] } + -- alive at this point: -- pcs_middle -- foreign_stuff - -- ds_details - -- new_iface - -- imported_modules + -- flat_details + -- imported_modules (seq'd) + -- new_iface ------------------- -- SIMPLIFY