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!
9 (This is cpp-dependent, of course)
13 /* Useful in the headers that we share with the RTS */
14 #define COMPILING_GHC 1
16 /* Pull in all the platform defines for this build (foo_TARGET_ARCH etc.) */
17 #include "ghc_boot_platform.h"
19 /* Pull in the autoconf defines (HAVE_FOO), but don't include
20 * ghcconfig.h, because that will include ghcplatform.h which has the
21 * wrong platform settings for the compiler (it has the platform
22 * settings for the target plat instead). */
23 #include "../includes/ghcautoconf.h"
25 #if __GLASGOW_HASKELL__ >= 602
26 #define SYSTEM_IO_ERROR System.IO.Error
28 #define SYSTEM_IO_ERROR System.IO
31 #ifdef __GLASGOW_HASKELL__
32 #define GLOBAL_VAR(name,value,ty) \
33 name = Util.global (value) :: IORef (ty); \
37 #if __GLASGOW_HASKELL__ >= 620
38 #define UNBOX_FIELD !!
46 #define ASSERT(e) if (not (e)) then (assertPanic __FILE__ __LINE__) else
47 #define ASSERT2(e,msg) if (not (e)) then (assertPprPanic __FILE__ __LINE__ (msg)) else
48 #define WARN( e, msg ) (warnPprTrace (e) __FILE__ __LINE__ (msg))
49 #define ASSERTM(mbool) do { bool <- mbool; ASSERT(bool) return () }
50 #define ASSERTM2(mbool,msg) do { bool <- mbool; ASSERT2(bool,msg) return () }
52 #define ASSERT(e) if False then error "ASSERT" else
53 #define ASSERT2(e,msg) if False then error "ASSERT2" else
55 #define ASSERTM2(e,msg)
56 #define WARN(e,msg) if False then error "WARN" else
59 -- This #ifndef lets us switch off the "import FastString"
60 -- when compiling FastString itself
61 #ifndef COMPILING_FAST_STRING
63 import qualified FastString as FS
66 #define SLIT(x) (FS.mkLitString# (x#))
67 #define FSLIT(x) (FS.mkFastString# (x#))
69 -- Useful for declaring arguments to be strict
70 #define STRICT1(f) f a b c | a `seq` False = undefined
71 #define STRICT2(f) f a b | a `seq` b `seq` False = undefined
72 #define STRICT3(f) f a b c | a `seq` b `seq` c `seq` False = undefined
73 #define STRICT4(f) f a b c d | a `seq` b `seq` c `seq` d `seq` False = undefined
74 #define STRICT5(f) f a b c d e | a `seq` b `seq` c `seq` d `seq` e `seq` False = undefined
75 #define STRICT6(f) f a b c d e f | a `seq` b `seq` c `seq` d `seq` e `seq` f `seq` False = undefined
77 #endif /* HsVersions.h */