diff options
author | Ian Lynagh <igloo@earth.li> | 2007-09-08 00:31:12 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-09-08 00:31:12 +0000 |
commit | f8c52d7fde2d7408b4f734251c373f8d3e2c558e (patch) | |
tree | c2f583f6ffa29ae9bad744a41bf355affafc31e9 /compiler/HsVersions.h | |
parent | 907c44ca14e479e5fa64d712703b8fbad19d1e04 (diff) | |
download | haskell-f8c52d7fde2d7408b4f734251c373f8d3e2c558e.tar.gz |
Make various assertions work when !DEBUG
Diffstat (limited to 'compiler/HsVersions.h')
-rw-r--r-- | compiler/HsVersions.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/HsVersions.h b/compiler/HsVersions.h index fb47f7cba5..a53fb4bf35 100644 --- a/compiler/HsVersions.h +++ b/compiler/HsVersions.h @@ -48,8 +48,9 @@ name = Util.global (value) :: IORef (ty); \ #define ASSERT(e) if False && (not (e)) then panic "ASSERT" else #define ASSERT2(e,msg) if False && (not (e)) then pprPanic "ASSERT2" (msg) else #define ASSERTM(e) do { let { _mbool = (e) } } -#define ASSERTM2(e,msg) do { let { _mbool = (e) }; when False (panic "ASSERTM2") } -#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 +#define ASSERTM2(e,msg) do { let { _mbool = (e) }; if False then panic "ASSERTM2" else return () } +#define WARN(e,msg) if False && (e) then pprPanic "WARN" (msg) else #endif -- This #ifndef lets us switch off the "import FastString" |