diff options
author | Ian Lynagh <igloo@earth.li> | 2008-07-30 12:01:34 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-07-30 12:01:34 +0000 |
commit | aa9a4f1053d3c554629a2ec25955e7530c95b892 (patch) | |
tree | 7d9839bc410e92c7b0a6e35713fbbf03673338be /compiler/main/DriverPipeline.hs | |
parent | 179a3a7bd67ccc816e3b934eff770fb49c4cc456 (diff) | |
download | haskell-aa9a4f1053d3c554629a2ec25955e7530c95b892.tar.gz |
Follow extensible exception changes
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 983bebef6f..6721b9154c 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -50,7 +50,7 @@ import SrcLoc ( unLoc ) import SrcLoc ( Located(..) ) import FastString -import Control.Exception as Exception +import Exception import Data.IORef ( readIORef, writeIORef, IORef ) import GHC.Exts ( Int(..) ) import System.Directory @@ -351,7 +351,7 @@ compileFile :: HscEnv -> Phase -> (FilePath, Maybe Phase) -> IO FilePath compileFile hsc_env stop_phase (src, mb_phase) = do exists <- doesFileExist src when (not exists) $ - throwDyn (CmdLineError ("does not exist: " ++ src)) + ghcError (CmdLineError ("does not exist: " ++ src)) let dflags = hsc_dflags hsc_env @@ -451,7 +451,7 @@ runPipeline stop_phase hsc_env0 (input_fn, mb_phase) mb_basename output maybe_lo -- before B in a normal compilation pipeline. when (not (start_phase `happensBefore` stop_phase)) $ - throwDyn (UsageError + ghcError (UsageError ("cannot compile this file to desired target: " ++ input_fn)) @@ -777,7 +777,7 @@ runPhase (Hsc src_flavour) stop hsc_env basename suff input_fn get_output_fn _ma Nothing -- No "module i of n" progress info case mbResult of - Nothing -> throwDyn (PhaseFailed "hsc" (ExitFailure 1)) + Nothing -> ghcError (PhaseFailed "hsc" (ExitFailure 1)) Just HscNoRecomp -> do SysTools.touch dflags' "Touching object file" o_file -- The .o file must have a later modification date @@ -818,7 +818,7 @@ runPhase Cmm stop hsc_env basename _ input_fn get_output_fn maybe_loc ok <- hscCmmFile hsc_env' input_fn - when (not ok) $ throwDyn (PhaseFailed "cmm" (ExitFailure 1)) + when (not ok) $ ghcError (PhaseFailed "cmm" (ExitFailure 1)) return (next_phase, dflags, maybe_loc, output_fn) @@ -1352,7 +1352,7 @@ linkBinary dflags o_files dep_packages = do -- parallel only: move binary to another dir -- HWL success <- runPhase_MoveBinary dflags output_fn dep_packages if success then return () - else throwDyn (InstallationError ("cannot move binary")) + else ghcError (InstallationError ("cannot move binary")) exeFileName :: DynFlags -> FilePath |