Fix pprPanic so that it doesn't throw away the SDoc part of the error.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Mon, 3 Dec 2012 01:28:39 +0000 (12:28 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 4 Dec 2012 11:53:13 +0000 (22:53 +1100)
compiler/utils/Outputable.lhs

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