[commit: ghc] master: Revert "Fix pprPanic so that it doesn't throw away the SDoc part of the error." (50905e1)

Ian Lynagh <[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/50905e1abeee21a5006f9c4e5a54654acff0542e

>---------------------------------------------------------------

commit 50905e1abeee21a5006f9c4e5a54654acff0542e
Author: Ian Lynagh <[email protected]>
Date:   Tue Dec 4 19:36:49 2012 +0000

    Revert "Fix pprPanic so that it doesn't throw away the SDoc part of the error."
    
    This reverts commit e6ce335e8e3ba0718efd234910185e4257424562.
    
    pprPanic doesn't throw the Doc away: It gets passed in the PprPanic
    constructor.

>---------------------------------------------------------------

 compiler/utils/Outputable.lhs |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs
index 362cd1a..ad0b9d7 100644
--- a/compiler/utils/Outputable.lhs
+++ b/compiler/utils/Outputable.lhs
@@ -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"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.