summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Runtime/Debugger.hs4
-rw-r--r--compiler/GHC/Runtime/Interpreter.hs17
-rw-r--r--compiler/GHC/SysTools/Process.hs4
-rw-r--r--compiler/GHC/SysTools/Tasks.hs4
-rw-r--r--compiler/GHC/Utils/Panic.hs4
5 files changed, 0 insertions, 33 deletions
diff --git a/compiler/GHC/Runtime/Debugger.hs b/compiler/GHC/Runtime/Debugger.hs
index f6f0036f18..2209805e75 100644
--- a/compiler/GHC/Runtime/Debugger.hs
+++ b/compiler/GHC/Runtime/Debugger.hs
@@ -265,10 +265,6 @@ pprTypeAndContents id = do
docs_term <- case e_term of
Right term -> showTerm term
Left exn -> return (text "*** Exception:" <+>
-#if __GLASGOW_HASKELL__ >= 903
- text (show (exn :: SomeExceptionWithLocation)))
-#else
text (show (exn :: SomeException)))
-#endif
return $ pprdId <+> equals <+> docs_term
else return pprdId
diff --git a/compiler/GHC/Runtime/Interpreter.hs b/compiler/GHC/Runtime/Interpreter.hs
index c164930c9f..fe7a1b1185 100644
--- a/compiler/GHC/Runtime/Interpreter.hs
+++ b/compiler/GHC/Runtime/Interpreter.hs
@@ -536,36 +536,19 @@ findSystemLibrary interp str = interpCmd interp (FindSystemLibrary str)
iservCall :: Binary a => IServInstance -> Message a -> IO a
iservCall iserv msg =
remoteCall (iservPipe iserv) msg
- -- TODO: Use SomeExceptionWithLocation?
-#if __GLASGOW_HASKELL__ >= 903
- `catchException` \(e :: SomeExceptionWithLocation) -> handleIServFailure iserv e
-#else
`catchException` \(e :: SomeException) -> handleIServFailure iserv e
-#endif
-- | Read a value from the iserv process
readIServ :: IServInstance -> Get a -> IO a
readIServ iserv get =
readPipe (iservPipe iserv) get
-#if __GLASGOW_HASKELL__ >= 903
- `catchException` \(e :: SomeExceptionWithLocation) -> handleIServFailure iserv e
-#else
`catchException` \(e :: SomeException) -> handleIServFailure iserv e
-#endif
-- | Send a value to the iserv process
writeIServ :: IServInstance -> Put -> IO ()
writeIServ iserv put =
writePipe (iservPipe iserv) put
-#if __GLASGOW_HASKELL__ >= 903
- `catchException` \(e :: SomeExceptionWithLocation) -> handleIServFailure iserv e
-#else
`catchException` \(e :: SomeException) -> handleIServFailure iserv e
-#endif
-#if __GLASGOW_HASKELL__ >= 903
-handleIServFailure :: IServInstance -> SomeExceptionWithLocation -> IO a
-#else
handleIServFailure :: IServInstance -> SomeException -> IO a
-#endif
handleIServFailure iserv e = do
let proc = iservProcess iserv
ex <- getProcessExitCode proc
diff --git a/compiler/GHC/SysTools/Process.hs b/compiler/GHC/SysTools/Process.hs
index 564670040a..d7b340ab20 100644
--- a/compiler/GHC/SysTools/Process.hs
+++ b/compiler/GHC/SysTools/Process.hs
@@ -63,11 +63,7 @@ readCreateProcessWithExitCode' proc = do
-- fork off a thread to start consuming the output
outMVar <- newEmptyMVar
-#if __GLASGOW_HASKELL__ >= 903
- let onError :: SomeExceptionWithLocation -> IO ()
-#else
let onError :: SomeException -> IO ()
-#endif
onError exc = putMVar outMVar (Left exc)
_ <- forkIO $ handle onError $ do
output <- hGetContents' outh
diff --git a/compiler/GHC/SysTools/Tasks.hs b/compiler/GHC/SysTools/Tasks.hs
index 054a573bfb..e0ea398ddc 100644
--- a/compiler/GHC/SysTools/Tasks.hs
+++ b/compiler/GHC/SysTools/Tasks.hs
@@ -195,11 +195,7 @@ runClang logger dflags args = traceToolCommand logger "clang" $ do
mb_env <- getGccEnv args2
catchException
(runSomethingFiltered logger id "Clang (Assembler)" clang args2 Nothing mb_env)
-#if __GLASGOW_HASKELL__ >= 903
- (\(err :: SomeExceptionWithLocation) -> do
-#else
(\(err :: SomeException) -> do
-#endif
errorMsg logger $
text ("Error running clang! you need clang installed to use the" ++
" LLVM backend") $+$
diff --git a/compiler/GHC/Utils/Panic.hs b/compiler/GHC/Utils/Panic.hs
index f337809426..badaee326a 100644
--- a/compiler/GHC/Utils/Panic.hs
+++ b/compiler/GHC/Utils/Panic.hs
@@ -141,11 +141,7 @@ safeShowException e = do
r <- try (return $! forceList (showException e))
case r of
Right msg -> return msg
-#if __GLASGOW_HASKELL__ >= 903
- Left e' -> safeShowException (e' :: SomeExceptionWithLocation)
-#else
Left e' -> safeShowException (e' :: SomeException)
-#endif
where
forceList [] = []
forceList xs@(x : xt) = x `seq` forceList xt `seq` xs