diff options
Diffstat (limited to 'compiler/main')
-rw-r--r-- | compiler/main/DriverMkDepend.hs | 6 | ||||
-rw-r--r-- | compiler/main/GhcMake.hs | 2 | ||||
-rw-r--r-- | compiler/main/SysTools.lhs | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/compiler/main/DriverMkDepend.hs b/compiler/main/DriverMkDepend.hs index 5a2b727ea6..cda0b4729f 100644 --- a/compiler/main/DriverMkDepend.hs +++ b/compiler/main/DriverMkDepend.hs @@ -64,8 +64,8 @@ doMkDependHS srcs = do } _ <- GHC.setSessionDynFlags dflags - when (null (depSuffixes dflags)) $ - throwGhcException (ProgramError "You must specify at least one -dep-suffix") + when (null (depSuffixes dflags)) $ liftIO $ + throwGhcExceptionIO (ProgramError "You must specify at least one -dep-suffix") files <- liftIO $ beginMkDependHS dflags @@ -193,7 +193,7 @@ processDeps :: DynFlags processDeps dflags _ _ _ _ (CyclicSCC nodes) = -- There shouldn't be any cycles; report them - throwGhcException (ProgramError (showSDoc dflags $ GHC.cyclicModuleErr nodes)) + throwGhcExceptionIO (ProgramError (showSDoc dflags $ GHC.cyclicModuleErr nodes)) processDeps dflags hsc_env excl_mods root hdl (AcyclicSCC node) = do { let extra_suffixes = depSuffixes dflags diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs index 80227cd3f3..81f338eb8c 100644 --- a/compiler/main/GhcMake.hs +++ b/compiler/main/GhcMake.hs @@ -1425,7 +1425,7 @@ preprocessFile hsc_env src_fn mb_phase (Just (buf, _time)) | otherwise = False when needs_preprocessing $ - throwGhcException (ProgramError "buffer needs preprocesing; interactive check disabled") + throwGhcExceptionIO (ProgramError "buffer needs preprocesing; interactive check disabled") return (dflags', src_fn, buf) diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs index 28ff49969d..e648481cd3 100644 --- a/compiler/main/SysTools.lhs +++ b/compiler/main/SysTools.lhs @@ -353,7 +353,7 @@ findTopDir Nothing maybe_exec_dir <- getBaseDir case maybe_exec_dir of -- "Just" on Windows, "Nothing" on unix - Nothing -> throwGhcException (InstallationError "missing -B<dir> option") + Nothing -> throwGhcExceptionIO (InstallationError "missing -B<dir> option") Just dir -> return dir \end{code} @@ -837,14 +837,14 @@ handleProc pgm phase_name proc = do -- the case of a missing program there will otherwise be no output -- at all. | n == 127 -> does_not_exist - | otherwise -> throwGhcException (PhaseFailed phase_name rc) + | otherwise -> throwGhcExceptionIO (PhaseFailed phase_name rc) where handler err = if IO.isDoesNotExistError err then does_not_exist else IO.ioError err - does_not_exist = throwGhcException (InstallationError ("could not execute: " ++ pgm)) + does_not_exist = throwGhcExceptionIO (InstallationError ("could not execute: " ++ pgm)) builderMainLoop :: DynFlags -> (String -> String) -> FilePath @@ -976,7 +976,7 @@ traceCmd dflags phase_name cmd_line action where handle_exn _verb exn = do { debugTraceMsg dflags 2 (char '\n') ; debugTraceMsg dflags 2 (ptext (sLit "Failed:") <+> text cmd_line <+> text (show exn)) - ; throwGhcException (PhaseFailed phase_name (ExitFailure 1)) } + ; throwGhcExceptionIO (PhaseFailed phase_name (ExitFailure 1)) } \end{code} %************************************************************************ |