diff options
| author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-06-07 12:10:38 +0100 | 
|---|---|---|
| committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-06-07 12:10:38 +0100 | 
| commit | 13602a465f8e8fcd530036a279abf50e4186c06c (patch) | |
| tree | 4e0b2d4b34ca4be5f63381be4bc8e564243c76a0 /compiler/HsVersions.h | |
| parent | 07a274072fc945a303ae3257b3035b74bd858f70 (diff) | |
| parent | b8e0074794e085fdc2271f39aec92a0b472c6b46 (diff) | |
| download | haskell-13602a465f8e8fcd530036a279abf50e4186c06c.tar.gz | |
Merge branch 'master' of http://darcs.haskell.org/ghc
Diffstat (limited to 'compiler/HsVersions.h')
| -rw-r--r-- | compiler/HsVersions.h | 13 | 
1 files changed, 2 insertions, 11 deletions
| diff --git a/compiler/HsVersions.h b/compiler/HsVersions.h index d85234784a..9a83af9768 100644 --- a/compiler/HsVersions.h +++ b/compiler/HsVersions.h @@ -46,18 +46,9 @@ name :: IORef (ty);                 \  name = Util.globalM (value);  #endif -#ifdef DEBUG -#define ASSERT(e)      if (not (e)) then (assertPanic __FILE__ __LINE__) else -#define ASSERT2(e,msg) if (not (e)) then (assertPprPanic __FILE__ __LINE__ (msg)) else +#define ASSERT(e)      if debugIsOn && not (e) then (assertPanic __FILE__ __LINE__) else +#define ASSERT2(e,msg) if debugIsOn && not (e) then (assertPprPanic __FILE__ __LINE__ (msg)) else  #define WARN( e, msg ) (warnPprTrace (e) __FILE__ __LINE__ (msg)) $ -#else --- We have to actually use all the variables we are given or we may get --- unused variable warnings when DEBUG is off. -#define ASSERT(e)      if False && (not (e)) then panic "ASSERT" else -#define ASSERT2(e,msg) if False && (const False (e,msg)) then pprPanic "ASSERT2" (msg) else -#define WARN(e,msg)    if False && (e) then pprPanic "WARN" (msg) else --- Here we deliberately don't use when as Control.Monad might not be imported -#endif  -- Examples:   Assuming   flagSet :: String -> m Bool  --  | 
