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
18 #define WARN( e, msg ) (warnPprTrace (e) __FILE__ __LINE__ (msg))
21 #define ASSERT2(e,msg)
28 #define CAT2(a,b)a/**/b
31 #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 202
32 # define failWith fail
33 # define MkIOError(h,errt,msg) (IOError (Just h) errt msg)
34 # define minInt (minBound::Int)
35 # define maxInt (maxBound::Int)
37 # define MkIOError(h,errt,msg) (errt msg)
40 #if defined(__GLASGOW_HASKELL__)
44 ( Int(..), Int#, (+#), (-#), (*#),
45 quotInt#, negateInt#, (==#), (<#), (<=#), (>=#), (>#)
50 #define IBOX(x) (I# (x))
54 #define _QUOT_ `quotInt#`
55 #define _NEG_ negateInt#
62 #define FAST_BOOL Int#
65 #define _IS_TRUE_(x) ((x) _EQ_ 1#)
67 #else {- ! __GLASGOW_HASKELL__ -}
84 #define FAST_BOOL Bool
87 #define _IS_TRUE_(x) (x)
89 #endif {- ! __GLASGOW_HASKELL__ -}
91 #if __GLASGOW_HASKELL__ >= 23
93 -- This #ifndef lets us switch off the "import FastString"
94 -- when compiling FastString itself
95 #ifndef COMPILING_FAST_STRING
97 import qualified FastString
100 # define USE_FAST_STRINGS 1
101 # define FAST_STRING FastString.FastString
102 # define SLIT(x) (FastString.mkFastCharString# (x#))
103 # define _NULL_ FastString.nullFastString
104 # define _NIL_ (FastString.mkFastString "")
105 # define _CONS_ FastString.consFS
106 # define _HEAD_ FastString.headFS
107 # define _HEAD_INT_ FastString.headIntFS
108 # define _TAIL_ FastString.tailFS
109 # define _LENGTH_ FastString.lengthFS
110 # define _PK_ FastString.mkFastString
111 # define _PK_INT_ FastString.mkFastStringInt
112 # define _UNPK_ FastString.unpackFS
113 # define _UNPK_INT_ FastString.unpackIntFS
114 # define _APPEND_ `FastString.appendFS`
115 # define _CONCAT_ FastString.concatFS
117 # error I think that FastString is now always used. If not, fix this.
118 # define FAST_STRING String
120 # define _CMP_STRING_ cmpString
126 # define _LENGTH_ length
127 # define _PK_ (\x->x)
128 # define _UNPK_ (\x->x)
129 # define _SUBSTR_ substr{-from Utils-}
131 # define _CONCAT_ concat
136 # define ISALPHANUM isAlphaNum
137 # define IOERROR ioError
142 # define ISALPHANUM isAlphanum
143 # define IOERROR fail
144 # define PSEQ (\x y -> y)