summaryrefslogtreecommitdiff
path: root/compiler/GHC/Utils/Panic.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Utils/Panic.hs')
-rw-r--r--compiler/GHC/Utils/Panic.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Utils/Panic.hs b/compiler/GHC/Utils/Panic.hs
index 398a97524c..13fccb22b2 100644
--- a/compiler/GHC/Utils/Panic.hs
+++ b/compiler/GHC/Utils/Panic.hs
@@ -110,7 +110,7 @@ data GhcException
| PprProgramError String SDoc
instance Exception GhcException where
- fromException (SomeException e)
+ fromException (SomeExceptionWithLocation e)
| Just ge <- cast e = Just ge
| Just pge <- cast e = Just $
case pge of
@@ -138,7 +138,7 @@ safeShowException e = do
r <- try (return $! forceList (showException e))
case r of
Right msg -> return msg
- Left e' -> safeShowException (e' :: SomeException)
+ Left e' -> safeShowException (e' :: SomeExceptionWithLocation)
where
forceList [] = []
forceList xs@(x : xt) = x `seq` forceList xt `seq` xs
@@ -196,7 +196,7 @@ pgmErrorDoc x doc = throwGhcException (PprProgramError x doc)
-- | Like try, but pass through UserInterrupt and Panic exceptions.
-- Used when we want soft failures when reading interface files, for example.
-- TODO: I'm not entirely sure if this is catching what we really want to catch
-tryMost :: IO a -> IO (Either SomeException a)
+tryMost :: IO a -> IO (Either SomeExceptionWithLocation a)
tryMost action = do r <- try action
case r of
Left se ->