X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FPanic.lhs;fp=compiler%2Futils%2FPanic.lhs;h=e11b28faefe5078bf77752c8cb446c82833a72bc;hb=d529d596a1256bb48bda45ec343631c879c8d56d;hp=ee0677725d24f1dcfd43ac3361aa35060e25a2a9;hpb=5a73f108480a0b443c74f93fafa2f5495e788643;p=ghc-hetmet.git diff --git a/compiler/utils/Panic.lhs b/compiler/utils/Panic.lhs index ee06777..e11b28f 100644 --- a/compiler/utils/Panic.lhs +++ b/compiler/utils/Panic.lhs @@ -63,7 +63,6 @@ ghcError e = Exception.throw e data GhcException = PhaseFailed String -- name of phase ExitCode -- an external phase (eg. cpp) failed - | Interrupted -- someone pressed ^C | Signal Int -- some other fatal signal (SIGHUP,SIGTERM) | UsageError String -- prints the short usage msg after the error | CmdLineError String -- cmdline prob, but doesn't print usage @@ -107,8 +106,6 @@ showGhcException (ProgramError str) = showString str showGhcException (InstallationError str) = showString str -showGhcException (Interrupted) - = showString "interrupted" showGhcException (Signal n) = showString "signal: " . shows n showGhcException (Panic s) @@ -151,7 +148,7 @@ assertPanic file line = \end{code} \begin{code} --- | tryMost is like try, but passes through Interrupted and Panic +-- | tryMost is like try, but passes through UserInterrupt and Panic -- exceptions. Used when we want soft failures when reading interface -- files, for example. @@ -162,7 +159,6 @@ tryMost action = do r <- try action Left se -> case fromException se of -- Some GhcException's we rethrow, - Just Interrupted -> throwIO se Just (Signal _) -> throwIO se Just (Panic _) -> throwIO se -- others we return @@ -189,7 +185,7 @@ installSignalHandlers = do modifyMVar_ interruptTargetThread (return . (main_thread :)) let - interrupt_exn = (toException Interrupted) + interrupt_exn = (toException UserInterrupt) interrupt = do withMVar interruptTargetThread $ \targets ->