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)
16 #define ASSERT(e) if (not (e)) then (assertPanic __FILE__ __LINE__) else
17 #define ASSERT2(e,msg) if (not (e)) then (assertPprPanic __FILE__ __LINE__ (msg)) else
20 #define ASSERT2(e,msg)
26 #define CAT2(a,b)a/**/b
29 #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 202
30 # define REALLY_HASKELL_1_3
32 # define EXP_MODULE(a) module a
33 # define IMPORT_DELOOPER(mod) import mod
34 # define IMPORT_1_3(mod) import mod
36 # define _ByteArray GlaExts.ByteArray
37 # define _MutableByteArray GlaExts.MutableByteArray
38 # define _MutableArray GlaExts.MutableArray
39 # define _RealWorld GlaExts.RealWorld
40 # define _ST GlaExts.ST
41 # define _ForeignObj Foreign.ForeignObj
42 # define _runST ST.runST
43 # define seqStrictlyST seqST
44 # define thenStrictlyST thenST
45 # define returnStrictlyST return
47 # if __GLASGOW_HASKELL__ >= 209
48 # define STATE_TOK(x) x
49 # define ST_RET(x,y) STret (y) (x)
50 # define unsafePerformST(x) runST (x)
51 # define ST_TO_PrimIO(x) (stToIO (x))
53 # define STATE_TOK(x) (S# x)
54 # define ST_RET(x,y) (x,y)
55 # define unsafePerformST(x) unsafePerformPrimIO(x)
56 # define ST_TO_PrimIO(x) x
58 # define failWith fail
59 # define MkIOError(h,errt,msg) (IOError (Just h) errt msg)
60 # define CCALL_THEN thenIO_Prim
62 # define IMP_FASTSTRING() import FastString
63 # if __GLASGOW_HASKELL__ >= 209
64 # define IMP_Ubiq() import GlaExts ; import Addr(Addr(..)); import FastString
65 # define CHK_Ubiq() import GlaExts ; import Addr(Addr(..)); import FastString
67 # define IMP_Ubiq() import GlaExts ; import FastString
68 # define CHK_Ubiq() import GlaExts ; import FastString
70 # define minInt (minBound::Int)
71 # define maxInt (maxBound::Int)
73 # define STATE_TOK(x) (S# x)
74 # define ST_RET(x,y) (x,y)
75 # define unsafePerformST(x) unsafePerformPrimIO(x)
76 # define ST_TO_PrimIO(x) x
77 # define SYN_IE(a) a(..)
78 # define EXP_MODULE(a) a..
79 # define IMPORT_DELOOPER(mod) import mod
80 # define IMPORT_1_3(mod) {--}
81 # define IMP_FASTSTRING() import FastString
82 # define IMP_Ubiq() IMPORT_DELOOPER(Ubiq) ; import FastString
83 # define CHK_Ubiq() IMPORT_DELOOPER(Ubiq) ; import FastString
85 # define CCALL_THEN thenPrimIO
86 # define MkIOError(h,errt,msg) (errt msg)
89 #if defined(__GLASGOW_HASKELL__)
93 ( Int(..), Int#, (+#), (-#), (*#),
94 quotInt#, negateInt#, (==#), (<#), (<=#), (>=#), (>#)
99 #define IBOX(x) (I# (x))
103 #define _QUOT_ `quotInt#`
104 #define _NEG_ negateInt#
111 #define FAST_BOOL Int#
114 #define _IS_TRUE_(x) ((x) _EQ_ 1#)
116 #else {- ! __GLASGOW_HASKELL__ -}
125 #define _QUOT_ `quot`
133 #define FAST_BOOL Bool
135 #define _FALSE_ False
136 #define _IS_TRUE_(x) (x)
138 #endif {- ! __GLASGOW_HASKELL__ -}
140 #if __GLASGOW_HASKELL__ >= 23
142 -- This #ifndef lets us switch off the "import FastString"
143 -- when compiling FastString itself
144 #ifndef COMPILING_FAST_STRING
146 import qualified FastString
149 # define USE_FAST_STRINGS 1
150 # define FAST_STRING FastString.FastString
151 # define SLIT(x) (FastString.mkFastCharString# (x#))
152 # define _NULL_ FastString.nullFastString
153 # define _NIL_ (FastString.mkFastString "")
154 # define _CONS_ FastString.consFS
155 # define _HEAD_ FastString.headFS
156 # define _TAIL_ FastString.tailFS
157 # define _LENGTH_ FastString.lengthFS
158 # define _PK_ FastString.mkFastString
159 # define _UNPK_ FastString.unpackFS
160 # define _APPEND_ `FastString.appendFS`
161 # define _CONCAT_ FastString.concatFS
163 # define FAST_STRING String
165 # define _CMP_STRING_ cmpString
171 # define _LENGTH_ length
172 # define _PK_ (\x->x)
173 # define _UNPK_ (\x->x)
174 # define _SUBSTR_ substr{-from Utils-}
176 # define _CONCAT_ concat