Document OccName and expand it's API
[ghc-hetmet.git] / compiler / main / DriverMkDepend.hs
index 1b3792e..481cd0c 100644 (file)
@@ -31,9 +31,9 @@ import SrcLoc
 import Data.List
 import FastString
 
+import Exception
 import ErrUtils         ( debugTraceMsg, putMsg )
 
-import Control.Exception
 import System.Exit      ( ExitCode(..), exitWith )
 import System.Directory
 import System.FilePath
@@ -127,9 +127,9 @@ beginMkDependHS dflags = do
                         then return ()
                         else chuck
 
-           catchJust ioErrors slurp
+           catchIO slurp
                 (\e -> if isEOFError e then return () else ioError e)
-           catchJust ioErrors chuck
+           catchIO chuck
                 (\e -> if isEOFError e then return () else ioError e)
 
            return (Just makefile_hdl)
@@ -171,7 +171,7 @@ processDeps :: DynFlags
 
 processDeps _ _ _ _ (CyclicSCC nodes)
   =     -- There shouldn't be any cycles; report them
-    throwDyn (ProgramError (showSDoc $ GHC.cyclicModuleErr nodes))
+    ghcError (ProgramError (showSDoc $ GHC.cyclicModuleErr nodes))
 
 processDeps dflags session excl_mods hdl (AcyclicSCC node)
   = do  { hsc_env <- GHC.sessionHscEnv session
@@ -296,7 +296,7 @@ endMkDependHS dflags
                 hPutStrLn tmp_hdl l
                 slurp
 
-        catchJust ioErrors slurp
+        catchIO slurp
                 (\e -> if isEOFError e then return () else ioError e)
 
         hClose hdl