diff options
Diffstat (limited to 'compiler/main')
| -rw-r--r-- | compiler/main/GHC.hs | 2 | ||||
| -rw-r--r-- | compiler/main/InteractiveEval.hs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 64042e2c31..f5320613ff 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -334,6 +334,7 @@ defaultErrorHandler dflags inner = Just (ioe :: IOException) -> fatalErrorMsg dflags (text (show ioe)) _ -> case fromException exception of + Just UserInterrupt -> exitWith (ExitFailure 1) Just StackOverflow -> fatalErrorMsg dflags (text "stack overflow: use +RTS -K<size> to increase it") _ -> case fromException exception of @@ -350,7 +351,6 @@ defaultErrorHandler dflags inner = hFlush stdout case ge of PhaseFailed _ code -> exitWith code - Interrupted -> exitWith (ExitFailure 1) Signal _ -> exitWith (ExitFailure 1) _ -> do fatalErrorMsg dflags (text (show ge)) exitWith (ExitFailure 1) diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs index 45519ff01e..38f0998207 100644 --- a/compiler/main/InteractiveEval.hs +++ b/compiler/main/InteractiveEval.hs @@ -380,9 +380,9 @@ rethrow dflags io = Exception.catch io $ \se -> do not (dopt Opt_BreakOnException dflags) then poke exceptionFlag 1 else case fromException se of - -- If it is an "Interrupted" exception, we allow + -- If it is a "UserInterrupt" exception, we allow -- a possible break by way of -fbreak-on-exception - Just Interrupted -> return () + Just UserInterrupt -> return () -- In any other case, we don't want to break _ -> poke exceptionFlag 0 |
