[project @ 2002-07-03 15:15:24 by sof]
[ghc-hetmet.git] / ghc / compiler / HsVersions.h
1 #ifndef HSVERSIONS_H
2 #define HSVERSIONS_H
3
4 #if 0
5
6 IMPORTANT!  If you put extra tabs/spaces in these macro definitions,
7 you will screw up the layout where they are used in case expressions!
8
9 (This is cpp-dependent, of course)
10
11 #endif
12
13 #ifdef __GLASGOW_HASKELL__
14 #define GLOBAL_VAR(name,value,ty)  \
15 name = Util.global (value) :: IORef (ty); \
16 {-# NOINLINE name #-}
17 #endif
18
19 #define COMMA ,
20
21 #ifdef DEBUG
22 #define ASSERT(e) if (not (e)) then (assertPanic __FILE__ __LINE__) else
23 #define ASSERT2(e,msg) if (not (e)) then (assertPprPanic __FILE__ __LINE__ (msg)) else
24 #define WARN( e, msg ) (warnPprTrace (e) __FILE__ __LINE__ (msg))
25 #else
26 #define ASSERT(e)
27 #define ASSERT2(e,msg)
28 #define WARN(e,msg)
29 #endif
30
31 -- temporary usage assertion control KSW 2000-10
32 #ifdef DO_USAGES
33 #define UASSERT(e) ASSERT(e)
34 #define UASSERT2(e,msg) ASSERT2(e,msg)
35 #else
36 #define UASSERT(e)
37 #define UASSERT2(e,msg)
38 #endif
39
40 -- This #ifndef lets us switch off the "import FastString"
41 -- when compiling FastString itself
42 #ifndef COMPILING_FAST_STRING
43 -- 
44 import qualified FastString 
45 #endif
46
47 #define SLIT(x)  (FastString.mkLitString# (x#))
48 #define FSLIT(x) (FastString.mkFastString# (x#))
49
50 #endif // HSVERSIONS_H