Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
d068f78b
Commit
d068f78b
authored
Sep 12, 2007
by
nr@eecs.harvard.edu
Browse files
make it easier to have debugging code typechecked even when debugging is turned off
parent
7457c489
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/HsVersions.h
View file @
d068f78b
...
...
@@ -37,12 +37,14 @@ name = Util.global (value) :: IORef (ty); \
#define COMMA ,
#ifdef DEBUG
#define debugIsOn True
#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 WARN( e, msg ) (warnPprTrace (e) __FILE__ __LINE__ (msg))
#define ASSERTM(mbool) do { bool <- mbool; ASSERT(bool) return () }
#define ASSERTM2(mbool,msg) do { bool <- mbool; ASSERT2(bool,msg) return () }
#else
#define debugIsOn False
--
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment