diff options
Diffstat (limited to 'compiler/utils/Outputable.hs')
-rw-r--r-- | compiler/utils/Outputable.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs index b3d77aa843..768d247bf0 100644 --- a/compiler/utils/Outputable.hs +++ b/compiler/utils/Outputable.hs @@ -1199,7 +1199,7 @@ pprTraceException heading doc = pprSTrace :: HasCallStack => SDoc -> a -> a pprSTrace doc = pprTrace "" (doc $$ callStackDoc) -warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a +warnPprTrace :: HasCallStack => Bool -> String -> Int -> SDoc -> a -> a -- ^ Just warn about an assertion failure, recording the given file and line number. -- Should typically be accessed with the WARN macros warnPprTrace _ _ _ _ x | not debugIsOn = x @@ -1207,7 +1207,9 @@ warnPprTrace _ _file _line _msg x | hasNoDebugOutput unsafeGlobalDynFlags = x warnPprTrace False _file _line _msg x = x warnPprTrace True file line msg x - = pprDebugAndThen unsafeGlobalDynFlags trace heading msg x + = pprDebugAndThen unsafeGlobalDynFlags trace heading + (msg $$ callStackDoc ) + x where heading = hsep [text "WARNING: file", text file <> comma, text "line", int line] |