Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
71847273
Commit
71847273
authored
Mar 29, 2008
by
Ian Lynagh
Browse files
Put debugIsOn in Util, rather than rely on it being CPPed in
parent
f555abff
Changes
4
Hide whitespace changes
Inline
Side-by-side
compiler/HsVersions.h
View file @
71847273
...
...
@@ -40,7 +40,6 @@ name = Util.global (value);
#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 MASSERT(e) ASSERT(e) return ()
...
...
@@ -49,7 +48,6 @@ name = Util.global (value);
#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
...
...
compiler/cmm/MkZipCfg.hs
View file @
71847273
...
...
@@ -15,6 +15,7 @@ import Outputable
import
Unique
import
UniqFM
import
UniqSupply
import
Util
import
Prelude
hiding
(
zip
,
unzip
,
last
)
...
...
compiler/cmm/ZipCfgCmmRep.hs
View file @
71847273
...
...
@@ -28,6 +28,7 @@ import MachOp
import
qualified
ZipDataflow0
as
DF
import
ZipCfg
import
MkZipCfg
import
Util
import
Maybes
import
Outputable
...
...
compiler/utils/Util.lhs
View file @
71847273
...
...
@@ -6,6 +6,7 @@
\begin{code}
module Util (
debugIsOn,
-- general list processing
zipEqual, zipWithEqual, zipWith3Equal, zipWith4Equal,
...
...
@@ -105,6 +106,21 @@ import System.Time ( ClockTime )
infixr 9 `thenCmp`
\end{code}
%************************************************************************
%* *
\subsection{-DDEBUG}
%* *
%************************************************************************
\begin{code}
debugIsOn :: Bool
#ifdef DEBUG
debugIsOn = True
#else
debugIsOn = False
#endif
\end{code}
%************************************************************************
%* *
\subsection{A for loop}
...
...
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