remove empty dir
[ghc-hetmet.git] / ghc / compiler / main / DriverMkDepend.hs
index 22e8904..80d906c 100644 (file)
@@ -20,7 +20,7 @@ import HscTypes               ( HscEnv, IsBootInterface, msObjFilePath, msHsFilePath )
 import Packages                ( PackageIdH(..) )
 import SysTools                ( newTempName )
 import qualified SysTools
-import Module          ( Module, ModLocation(..), mkModule, moduleUserString,
+import Module          ( Module, ModLocation(..), mkModule, 
                          addBootSuffix_maybe )
 import Digraph         ( SCC(..) )
 import Finder          ( findModule, FindResult(..) )
@@ -60,17 +60,17 @@ doMkDependHS session srcs
        ; targets <- mapM (\s -> GHC.guessTarget s Nothing) srcs
        ; GHC.setTargets session targets
        ; excl_mods <- readIORef v_Dep_exclude_mods
-       ; r <- GHC.depanal session excl_mods
+       ; r <- GHC.depanal session excl_mods True {- Allow dup roots -}
        ; case r of
-           Left e -> do printErrorsAndWarnings e; exitWith (ExitFailure 1)
-           Right mod_summaries -> do {
+           Nothing -> exitWith (ExitFailure 1)
+           Just mod_summaries -> do {
 
                -- Sort into dependency order
                -- There should be no cycles
          let sorted = GHC.topSortModuleGraph False mod_summaries Nothing
 
                -- Print out the dependencies if wanted
-       ; debugTraceMsg dflags 2 (showSDoc (text "Module dependencies" $$ ppr sorted))
+       ; debugTraceMsg dflags 2 (text "Module dependencies" $$ ppr sorted)
 
                -- Prcess them one by one, dumping results into makefile
                -- and complaining about cycles