diff options
| author | Ian Lynagh <ian@well-typed.com> | 2013-01-30 13:35:47 +0000 |
|---|---|---|
| committer | Ian Lynagh <ian@well-typed.com> | 2013-01-30 17:43:44 +0000 |
| commit | 2fcb295adbe3c3f260395bc3412b55dc277e4420 (patch) | |
| tree | 0007ac0ff061742b308367fa0f8d9b2b52a1137f | |
| parent | e66b09ee73e7589c8b16a4e5f0bdef72c8bcd62d (diff) | |
| download | haskell-2fcb295adbe3c3f260395bc3412b55dc277e4420.tar.gz | |
Use throwGhcExceptionIO rather than throwGhcException in main/DriverPipeline.hs
| -rw-r--r-- | compiler/main/DriverPipeline.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 81d0bc0165..367e109880 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -430,7 +430,7 @@ compileFile :: HscEnv -> Phase -> (FilePath, Maybe Phase) -> IO FilePath compileFile hsc_env stop_phase (src, mb_phase) = do exists <- doesFileExist src when (not exists) $ - throwGhcException (CmdLineError ("does not exist: " ++ src)) + throwGhcExceptionIO (CmdLineError ("does not exist: " ++ src)) let dflags = hsc_dflags hsc_env @@ -542,7 +542,7 @@ runPipeline stop_phase hsc_env0 (input_fn, mb_phase) let happensBefore' = happensBefore dflags when (not (start_phase `happensBefore'` stop_phase)) $ - throwGhcException (UsageError + throwGhcExceptionIO (UsageError ("cannot compile this file to desired target: " ++ input_fn)) @@ -1895,8 +1895,8 @@ linkBinary dflags o_files dep_packages = do -- parallel only: move binary to another dir -- HWL success <- runPhase_MoveBinary dflags output_fn - if success then return () - else throwGhcException (InstallationError ("cannot move binary")) + unless success $ + throwGhcExceptionIO (InstallationError ("cannot move binary")) exeFileName :: DynFlags -> FilePath |
