diff options
-rw-r--r-- | compiler/utils/Outputable.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs index e43573499c..2b89162296 100644 --- a/compiler/utils/Outputable.hs +++ b/compiler/utils/Outputable.hs @@ -82,7 +82,7 @@ module Outputable ( -- * Error handling and debugging utilities pprPanic, pprSorry, assertPprPanic, pprPgmError, pprTrace, pprTraceDebug, pprTraceIt, warnPprTrace, pprSTrace, - pprTraceException, + pprTraceException, pprTraceM, trace, pgmError, panic, sorry, assertPanic, pprDebugAndThen, callStackDoc, ) where @@ -1182,6 +1182,9 @@ pprTrace str doc x | otherwise = pprDebugAndThen unsafeGlobalDynFlags trace (text str) doc x +pprTraceM :: Applicative f => String -> SDoc -> f () +pprTraceM str doc = pprTrace str doc (pure ()) + -- | @pprTraceIt desc x@ is equivalent to @pprTrace desc (ppr x) x@ pprTraceIt :: Outputable a => String -> a -> a pprTraceIt desc x = pprTrace desc (ppr x) x |