[commit: ghc] master: Fix pprPanic so that it doesn't throw away the SDoc part of the error. (e6ce335)
Erik de Castro <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <[email protected]> |
Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master http://hackage.haskell.org/trac/ghc/changeset/e6ce335e8e3ba0718efd234910185e4257424562 >--------------------------------------------------------------- commit e6ce335e8e3ba0718efd234910185e4257424562 Author: Erik de Castro Lopo <[email protected]> Date: Mon Dec 3 12:28:39 2012 +1100 Fix pprPanic so that it doesn't throw away the SDoc part of the error. >--------------------------------------------------------------- compiler/utils/Outputable.lhs | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index ad0b9d7..362cd1a 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -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"