[commit: ghc] master: Stop double-stacktrace in ASSERT failures (e2998d7)

git at git.haskell.org git at git.haskell.org
Thu Jan 4 17:41:02 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e2998d720c6b6bf72c86201d816f256a8ba704e6/ghc

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

commit e2998d720c6b6bf72c86201d816f256a8ba704e6
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Jan 4 16:12:39 2018 +0000

    Stop double-stacktrace in ASSERT failures
    
    We were getting the stack trace printed twice in assertion
    failures (e.g. see the Description of Trac #14552).
    
    This fixes it, by deleting code.
    
    (c.f. Trac #14635 which reports the same bug in documentation).


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

e2998d720c6b6bf72c86201d816f256a8ba704e6
 compiler/utils/Outputable.hs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs
index 3050fa1..793b8fb 100644
--- a/compiler/utils/Outputable.hs
+++ b/compiler/utils/Outputable.hs
@@ -1203,9 +1203,7 @@ warnPprTrace True   file  line  msg x
 -- line number. Should typically be accessed with the ASSERT family of macros
 assertPprPanic :: HasCallStack => String -> Int -> SDoc -> a
 assertPprPanic _file _line msg
-  = pprPanic "ASSERT failed!" doc
-  where
-    doc = sep [ msg, callStackDoc ]
+  = pprPanic "ASSERT failed!" msg
 
 pprDebugAndThen :: DynFlags -> (String -> a) -> SDoc -> SDoc -> a
 pprDebugAndThen dflags cont heading pretty_msg



More information about the ghc-commits mailing list