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
24 #define CAT2(a,b)a/**/b
27 #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ == 201
28 # define REALLY_HASKELL_1_3
30 # define EXP_MODULE(a) module a
31 # define IMPORT_DELOOPER(mod) import mod
32 # define IMPORT_1_3(mod) import mod
33 # define _tagCmp compare
37 # define _Addr GHCbase.Addr
38 # define _ByteArray GHCbase.ByteArray
39 # define _MutableByteArray GHCbase.MutableByteArray
40 # define _MutableArray GHCbase.MutableArray
41 # define _RealWorld GHCbase.RealWorld
42 # define _ST GHCbase.ST
43 # define _ForeignObj GHCbase.ForeignObj
44 # define _runST STbase.runST
45 # define failWith fail
47 # define MkIOError(h,errt,msg) (errt msg)
49 # define IMP_FASTSTRING()
50 # define IMP_Ubiq() IMPORT_DELOOPER(Ubiq); import qualified GHCbase
51 # define CHK_Ubiq() IMPORT_DELOOPER(Ubiq); import qualified GHCbase
52 # define minInt (minBound::Int)
53 # define maxInt (maxBound::Int)
54 #elif defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 202
55 # define REALLY_HASKELL_1_3
57 # define EXP_MODULE(a) module a
58 # define IMPORT_DELOOPER(mod) import mod
59 # define IMPORT_1_3(mod) import mod
60 # define _CMP_TAG Ordering
61 # define _tagCmp compare
65 # define _Addr GlaExts.Addr
66 # define _ByteArray GlaExts.ByteArray
67 # define _MutableByteArray GlaExts.MutableByteArray
68 # define _MutableArray GlaExts.MutableArray
69 # define _RealWorld GlaExts.RealWorld
70 # define _ST GlaExts.ST
71 # define _ForeignObj Foreign.ForeignObj
72 # define _runST ST.runST
73 # define seqStrictlyST seqST
74 # define thenStrictlyST thenST
75 # define returnStrictlyST return
76 # define _readHandle IOHandle.readHandle
77 # define _writeHandle IOHandle.writeHandle
78 # define _newHandle IOHandle.newdHandle
80 # define failWith fail
81 # define MkIOError(h,errt,msg) (IOError (Just h) errt msg)
82 # define CCALL_THEN thenIO_Prim
83 # define _filePtr IOHandle.filePtr
85 # define IMP_FASTSTRING() import FastString
86 # define IMP_Ubiq() import GlaExts ; import FastString
87 # define CHK_Ubiq() import GlaExts ; import FastString
88 # define minInt (minBound::Int)
89 # define maxInt (maxBound::Int)
91 # define SYN_IE(a) a(..)
92 # define EXP_MODULE(a) a..
93 # define IMPORT_DELOOPER(mod) import mod
94 # define IMPORT_1_3(mod) {--}
95 # define IMP_FASTSTRING() import FastString
96 # define IMP_Ubiq() IMPORT_DELOOPER(Ubiq) ; import FastString
97 # define CHK_Ubiq() IMPORT_DELOOPER(Ubiq) ; import FastString
99 # define CCALL_THEN thenPrimIO
100 # define MkIOError(h,errt,msg) (errt msg)
103 #if __GLASGOW_HASKELL__ >= 26 && __GLASGOW_HASKELL__ < 200
113 #if defined(__GLASGOW_HASKELL__)
114 #define FAST_INT Int#
116 #define IBOX(x) (I# (x))
117 #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 201
118 #define _ADD_ `plusInt#`
119 #define _SUB_ `minusInt#`
120 #define _MUL_ `timesInt#`
121 #define _DIV_ `divInt#`
122 #define _QUOT_ `quotInt#`
123 #define _NEG_ negateInt#
124 #define _EQ_ `eqInt#`
125 #define _LT_ `ltInt#`
126 #define _LE_ `leInt#`
127 #define _GE_ `geInt#`
128 #define _GT_ `gtInt#`
134 #define _QUOT_ `quotInt#`
135 #define _NEG_ negateInt#
143 #define FAST_BOOL Int#
146 #define _IS_TRUE_(x) ((x) _EQ_ 1#)
148 #else {- ! __GLASGOW_HASKELL__ -}
157 #define _QUOT_ `quot`
165 #define FAST_BOOL Bool
167 #define _FALSE_ False
168 #define _IS_TRUE_(x) (x)
170 #endif {- ! __GLASGOW_HASKELL__ -}
172 #if __GLASGOW_HASKELL__ >= 23
173 # define USE_FAST_STRINGS 1
174 # if __GLASGOW_HASKELL__ < 200 || __GLASGOW_HASKELL__ >= 202
175 # define FAST_STRING FastString {-_PackedString -}
176 # if __GLASGOW_HASKELL__ < 200
177 # define SLIT(x) (mkFastCharString (A# (x#)))
179 # define SLIT(x) (mkFastCharString (GlaExts.A# (x#)))
181 # define _CMP_STRING_ cmpPString
182 /* cmpPString defined in utils/Util.lhs */
183 # define _NULL_ nullFastString {-_nullPS-}
184 # define _NIL_ (mkFastString "") {-_nilPS -}
185 # define _CONS_ consFS {-_consPS-}
186 # define _HEAD_ headFS {-_headPS-}
187 # define _TAIL_ tailFS {-_tailPS-}
188 # define _LENGTH_ lengthFS {-_lengthPS-}
189 # define _PK_ mkFastString {-_packString-}
190 # define _UNPK_ unpackFS {-_unpackPS-}
191 /* # define _SUBSTR_ _substrPS */
192 # define _APPEND_ `appendFS` {-`_appendPS`-}
193 # define _CONCAT_ concatFS {-_concatPS-}
195 # define FAST_STRING GHCbase.PackedString
196 # define SLIT(x) (packCString (GHCbase.A# x#))
197 # define _CMP_STRING_ cmpPString
198 # define _NULL_ nullPS
200 # define _CONS_ consPS
201 # define _HEAD_ headPS
202 # define _TAIL_ tailPS
203 # define _LENGTH_ lengthPS
204 # define _PK_ packString
205 # define _UNPK_ unpackPS
206 # define _SUBSTR_ substrPS
207 # define _APPEND_ `appendPS`
208 # define _CONCAT_ concatPS
211 # define FAST_STRING String
213 # define _CMP_STRING_ cmpString
219 # define _LENGTH_ length
220 # define _PK_ (\x->x)
221 # define _UNPK_ (\x->x)
222 # define _SUBSTR_ substr{-from Utils-}
224 # define _CONCAT_ concat