#if __GLASGOW_HASKELL__ <= 408
import Panic ( catchJust, ioErrors )
#endif
+import ErrUtils ( debugTraceMsg )
-----------------------------------------------------------------
--
; files <- beginMkDependHS dflags
-- Do the downsweep to find all the modules
- ; targets <- mapM GHC.guessTarget srcs
+ ; targets <- mapM (\s -> GHC.guessTarget s Nothing) srcs
; GHC.setTargets session targets
; excl_mods <- readIORef v_Dep_exclude_mods
; GHC.depanal session excl_mods
-- Sort into dependency order
-- There should be no cycles
- ; let sorted = GHC.topSortModuleGraph False mod_summaries
+ ; let sorted = GHC.topSortModuleGraph False mod_summaries Nothing
-- Print out the dependencies if wanted
- ; if verbosity dflags >= 2 then
- hPutStrLn stderr (showSDoc (text "Module dependencies" $$ ppr sorted))
- else return ()
+ ; debugTraceMsg dflags 2 (showSDoc (text "Module dependencies" $$ ppr sorted))
-- Prcess them one by one, dumping results into makefile
-- and complaining about cycles