Revert "Fix pprPanic so that it doesn't throw away the SDoc part of the error."
authorIan Lynagh <ian@well-typed.com>
Tue, 4 Dec 2012 19:36:49 +0000 (19:36 +0000)
committerIan Lynagh <ian@well-typed.com>
Tue, 4 Dec 2012 19:36:49 +0000 (19:36 +0000)
This reverts commit e6ce335e8e3ba0718efd234910185e4257424562.

pprPanic doesn't throw the Doc away: It gets passed in the PprPanic
constructor.

compiler/utils/Outputable.lhs

index 362cd1a..ad0b9d7 100644 (file)
@@ -898,8 +898,7 @@ plural _   = char 's'
 
 pprPanic :: String -> SDoc -> a
 -- ^ Throw an exception saying "bug in GHC"
-pprPanic s doc
- = throwGhcException (Panic (s ++ "\n" ++ showSDoc unsafeGlobalDynFlags doc))
+pprPanic    = panicDoc
 
 pprSorry :: String -> SDoc -> a
 -- ^ Throw an exception saying "this isn't finished yet"