X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FcompMan%2FCompManager.lhs;h=24a53b8c3743ed054552f20fbc5fcb79d7cb930d;hb=3376344b1351049aeca92f27b216ade8ea9af243;hp=56d8325c07a49dd71e4b96962154c6d5b0b0cade;hpb=dea3256b2af579e9f2d8b119a45d684094a1f9c5;p=ghc-hetmet.git diff --git a/ghc/compiler/compMan/CompManager.lhs b/ghc/compiler/compMan/CompManager.lhs index 56d8325..24a53b8 100644 --- a/ghc/compiler/compMan/CompManager.lhs +++ b/ghc/compiler/compMan/CompManager.lhs @@ -34,7 +34,6 @@ where import CmLink import CmTypes -import CmStaticInfo ( GhciMode(..) ) import DriverPipeline import DriverFlags ( getDynFlags ) import DriverPhases @@ -55,8 +54,8 @@ import UniqFM import Unique ( Uniquable ) import Digraph ( SCC(..), stronglyConnComp, flattenSCC ) import ErrUtils ( showPass ) +import SysTools ( cleanTempFilesExcept ) import Util -import TmpFiles import Outputable import Panic import CmdLineOpts ( DynFlags(..) ) @@ -344,12 +343,12 @@ cmUnload state@CmState{ gmode=mode, pls=pls, pcs=pcs } dflags -- the system state at the same time. cmLoadModule :: CmState - -> FilePath + -> [FilePath] -> IO (CmState, -- new state Bool, -- was successful [String]) -- list of modules loaded -cmLoadModule cmstate1 rootname +cmLoadModule cmstate1 rootnames = do -- version 1's are the original, before downsweep let pls1 = pls cmstate1 let pcs1 = pcs cmstate1 @@ -369,9 +368,11 @@ cmLoadModule cmstate1 rootname showPass dflags "Chasing dependencies" when (verb >= 1 && ghci_mode == Batch) $ - hPutStrLn stderr (progName ++ ": chasing modules from: " ++ rootname) + hPutStrLn stderr (showSDoc (hcat [ + text progName, text ": chasing modules from: ", + hcat (punctuate comma (map text rootnames))])) - (mg2unsorted, a_root_is_Main) <- downsweep [rootname] mg1 + (mg2unsorted, a_root_is_Main) <- downsweep rootnames mg1 let mg2unsorted_names = map name_of_summary mg2unsorted -- reachable_from follows source as well as normal imports @@ -889,10 +890,9 @@ downwards_closure_of_module summaries root res = simple_transitive_closure (map toEdge summaries) [root] in - --trace (showSDoc (text "DC of mod" <+> ppr root - -- <+> text "=" <+> ppr res)) ( +-- trace (showSDoc (text "DC of mod" <+> ppr root +-- <+> text "=" <+> ppr res)) $ res - --) -- Calculate transitive closures from a set of roots given an adjacency list simple_transitive_closure :: Eq a => [(a,[a])] -> [a] -> [a]