diff options
| author | simonpj <unknown> | 1999-01-07 12:47:35 +0000 |
|---|---|---|
| committer | simonpj <unknown> | 1999-01-07 12:47:35 +0000 |
| commit | 6c43076c1303c7501f1b3c3f4db63df6cd6702ff (patch) | |
| tree | 5bd357c1f4706b2cc9baa5bd506dbdda74c6b51f /ghc/compiler/utils/Outputable.lhs | |
| parent | 033f9d00fe94100cd9ad89c53df8b5a28cf986a5 (diff) | |
| download | haskell-6c43076c1303c7501f1b3c3f4db63df6cd6702ff.tar.gz | |
[project @ 1999-01-07 12:47:34 by simonpj]
Add debug macro WARN
Diffstat (limited to 'ghc/compiler/utils/Outputable.lhs')
| -rw-r--r-- | ghc/compiler/utils/Outputable.lhs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ghc/compiler/utils/Outputable.lhs b/ghc/compiler/utils/Outputable.lhs index 0e55176aa2..15a2acf83a 100644 --- a/ghc/compiler/utils/Outputable.lhs +++ b/ghc/compiler/utils/Outputable.lhs @@ -402,4 +402,12 @@ assertPprPanic file line msg text file, text "line", int line], msg] + +warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a +warnPprTrace False file line msg x = x +warnPprTrace True file line msg x + = trace (show (doc PprDebug)) x + where + doc = sep [hsep [text "WARNING: file", text file, text "line", int line], + msg] \end{code} |
