diff options
author | Ian Lynagh <igloo@earth.li> | 2012-06-05 00:52:01 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-06-05 03:11:23 +0100 |
commit | 243439e6e77eca548a6583722792d6b96e3f6bcd (patch) | |
tree | 82a7852a205a53f3acfcd5d345a43cb7e284108f /compiler/utils | |
parent | 50fddb2b046605315f903d9b744780497cc978de (diff) | |
download | haskell-243439e6e77eca548a6583722792d6b96e3f6bcd.tar.gz |
Change how macros like ASSERT are defined
By using Haskell's debugIsOn rather than CPP's "#ifdef DEBUG", we
don't need to kludge things to keep the warning checker happy etc.
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/Outputable.lhs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index 3130f7175f..9076913751 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -78,7 +78,7 @@ import FastString import FastTypes import Platform import qualified Pretty -import Util ( snocView ) +import Util import Pretty ( Doc, Mode(..) ) import Panic @@ -936,6 +936,7 @@ pprPanicFastInt heading pretty_msg = warnPprTrace :: 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 warnPprTrace _ _file _line _msg x | opt_NoDebugOutput = x warnPprTrace False _file _line _msg x = x warnPprTrace True file line msg x |