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__ >= 504
27 #define CONCURRENT Control.Concurrent
28 #define EXCEPTION Control.Exception
29 /* If you want Control.Exception.try, get it as Panic.try, which
30 deals with the shift from 'tryAllIO' to 'try'. */
31 #define DYNAMIC Data.Dynamic
32 #define GLAEXTS GHC.Exts
33 #define DATA_BITS Data.Bits
34 #define DATA_INT Data.Int
35 #define DATA_WORD Data.Word
36 #define UNSAFE_IO System.IO.Unsafe
37 #define TRACE Debug.Trace
38 #define DATA_IOREF Data.IORef
39 #define FIX_IO System.IO
40 #define MONAD_ST Control.Monad.ST
41 #define ST_ARRAY Data.Array.ST
45 #define CONCURRENT Concurrent
46 #define EXCEPTION Exception
47 #define DYNAMIC Dynamic
48 #define GLAEXTS GlaExts
49 #define DATA_BITS Bits
51 #define DATA_WORD Word
52 #define UNSAFE_IO IOExts
54 #define DATA_IOREF IOExts
61 #ifdef __GLASGOW_HASKELL__
62 #define GLOBAL_VAR(name,value,ty) \
63 name = Util.global (value) :: IORef (ty); \
67 #if __GLASGOW_HASKELL__ >= 620
68 #define UNBOX_FIELD !!
76 #define ASSERT(e) if (not (e)) then (assertPanic __FILE__ __LINE__) else
77 #define ASSERT2(e,msg) if (not (e)) then (assertPprPanic __FILE__ __LINE__ (msg)) else
78 #define WARN( e, msg ) (warnPprTrace (e) __FILE__ __LINE__ (msg))
79 #define ASSERTM(mbool) do { bool <- mbool; ASSERT(bool) return () }
80 #define ASSERTM2(mbool,msg) do { bool <- mbool; ASSERT2(bool,msg) return () }
82 #define ASSERT(e) if False then error "ASSERT" else
83 #define ASSERT2(e,msg) if False then error "ASSERT2" else
85 #define ASSERTM2(e,msg)
86 #define WARN(e,msg) if False then error "WARN" else
89 -- This #ifndef lets us switch off the "import FastString"
90 -- when compiling FastString itself
91 #ifndef COMPILING_FAST_STRING
93 import qualified FastString
96 #define SLIT(x) (FastString.mkLitString# (x#))
97 #define FSLIT(x) (FastString.mkFastString# (x#))
99 #endif /* HsVersions.h */