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 #ifdef __GLASGOW_HASKELL__
14 #define GLOBAL_VAR(name,value,ty) \
15 name = Util.global (value) :: IORef (ty); \
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))
27 #define ASSERT2(e,msg)
31 -- temporary usage assertion control KSW 2000-10
33 #define UASSERT(e) ASSERT(e)
34 #define UASSERT2(e,msg) ASSERT2(e,msg)
37 #define UASSERT2(e,msg)
40 #if __GLASGOW_HASKELL__ >= 23
42 -- This #ifndef lets us switch off the "import FastString"
43 -- when compiling FastString itself
44 #ifndef COMPILING_FAST_STRING
46 import qualified FastString
49 # define USE_FAST_STRINGS 1
50 # define FAST_STRING FastString.FastString
51 # define SLIT(x) (FastString.mkFastCharString# (x#))
52 # define _NULL_ FastString.nullFastString
53 # define _NIL_ (FastString.mkFastString "")
54 # define _CONS_ FastString.consFS
55 # define _HEAD_ FastString.headFS
56 # define _HEAD_INT_ FastString.headIntFS
57 # define _TAIL_ FastString.tailFS
58 # define _LENGTH_ FastString.lengthFS
59 # define _PK_ FastString.mkFastString
60 # define _UNPK_ FastString.unpackFS
61 # define _UNPK_INT_ FastString.unpackIntFS
62 # define _APPEND_ `FastString.appendFS`
64 # error I think that FastString is now always used. If not, fix this.
65 # define FAST_STRING String
67 # define _CMP_STRING_ cmpString
73 # define _LENGTH_ length
75 # define _UNPK_ (\x->x)
76 # define _SUBSTR_ substr{-from Utils-}