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 #if __GLASGOW_HASKELL__ >= 504
15 #define CONCURRENT Control.Concurrent
16 #define EXCEPTION Control.Exception
17 /* If you want Control.Exception.try, get it as Panic.try, which
18 deals with the shift from 'tryAllIO' to 'try'. */
19 #define DYNAMIC Data.Dynamic
20 #define GLAEXTS GHC.Exts
21 #define DATA_BITS Data.Bits
22 #define DATA_INT Data.Int
23 #define DATA_WORD Data.Word
24 #define UNSAFE_IO System.IO.Unsafe
25 #define TRACE Debug.Trace
26 #define DATA_IOREF Data.IORef
27 #define FIX_IO System.IO
28 #define MONAD_ST Control.Monad.ST
29 #define ST_ARRAY Data.Array.ST
33 #define CONCURRENT Concurrent
34 #define EXCEPTION Exception
35 #define DYNAMIC Dynamic
36 #define GLAEXTS GlaExts
37 #define DATA_BITS Bits
39 #define DATA_WORD Word
40 #define UNSAFE_IO IOExts
42 #define DATA_IOREF IOExts
49 #ifdef __GLASGOW_HASKELL__
50 #define GLOBAL_VAR(name,value,ty) \
51 name = Util.global (value) :: IORef (ty); \
55 #if __GLASGOW_HASKELL__ >= 620
56 #define UNBOX_FIELD !!
64 #define ASSERT(e) if (not (e)) then (assertPanic __FILE__ __LINE__) else
65 #define ASSERT2(e,msg) if (not (e)) then (assertPprPanic __FILE__ __LINE__ (msg)) else
66 #define WARN( e, msg ) (warnPprTrace (e) __FILE__ __LINE__ (msg))
67 #define ASSERTM(mbool) do { bool <- mbool; ASSERT(bool) return () }
68 #define ASSERTM2(mbool,msg) do { bool <- mbool; ASSERT2(bool,msg) return () }
70 #define ASSERT(e) if False then error "ASSERT" else
71 #define ASSERT2(e,msg) if False then error "ASSERT2" else
73 #define ASSERTM2(e,msg)
74 #define WARN(e,msg) if False then error "WARN" else
77 -- This #ifndef lets us switch off the "import FastString"
78 -- when compiling FastString itself
79 #ifndef COMPILING_FAST_STRING
81 import qualified FastString
84 #define SLIT(x) (FastString.mkLitString# (x#))
85 #define FSLIT(x) (FastString.mkFastString# (x#))
87 #endif /* HsVersions.h */