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)
15 #define MkArray _Array
17 #ifdef __GLASGOW_HASKELL__
26 #define IMPORT_Trace import Trace
30 #define IMPORT_Trace {--}
31 #define BSCC(l) (_scc_ l (
35 -- these are overridable
49 #define RETN_TYPE {--}
50 #endif /* RETN_TYPE */
55 #define ASSERT(e) if (not (e)) then (assertPanic __FILE__ __LINE__) else
56 #define CHK_Ubiq() import Ubiq
62 -- ToDo: ghci needs to load far too many bits of the backend because
63 -- this ATTACK_PRAGMA stuff encourages Utils.lhs to tell
64 -- everyone about everyone else. I guess we need to add some
65 -- more conditional stuff in.
66 #ifdef USE_ATTACK_PRAGMAS
67 #define IF_ATTACK_PRAGMAS(x) x
69 #define IF_ATTACK_PRAGMAS(x) {--}
73 #define IF_GHCI(stuff) stuff
75 #define IF_GHCI(stuff) {-nothing-}
78 #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 26
82 #if defined(__GLASGOW_HASKELL__)
85 #define IBOX(x) (I# (x))
86 #define _ADD_ `plusInt#`
87 #define _SUB_ `minusInt#`
88 #define _MUL_ `timesInt#`
89 #define _DIV_ `divInt#`
90 #define _QUOT_ `quotInt#`
91 #define _NEG_ negateInt#
98 #define FAST_BOOL Int#
101 #define _IS_TRUE_(x) ((x) `eqInt#` 1#)
103 #else {- ! __GLASGOW_HASKELL__ -}
112 #define _QUOT_ `quot`
120 #define FAST_BOOL Bool
122 #define _FALSE_ False
123 #define _IS_TRUE_(x) (x)
125 #endif {- ! __GLASGOW_HASKELL__ -}
127 #if __GLASGOW_HASKELL__ >= 23
128 #define USE_FAST_STRINGS 1
129 #define FAST_STRING _PackedString
130 #define SLIT(x) (_packCString (A# x#))
131 #define _CMP_STRING_ cmpPString
132 #define _NULL_ _nullPS
134 #define _CONS_ _consPS
135 #define _HEAD_ _headPS
136 #define _TAIL_ _tailPS
137 #define _LENGTH_ _lengthPS
138 #define _PK_ _packString
139 #define _UNPK_ _unpackPS
140 #define _SUBSTR_ _substrPS
141 #define _APPEND_ `_appendPS`
142 #define _CONCAT_ _concatPS
144 #define FAST_STRING String
146 #define _CMP_STRING_ cmpString
152 #define _LENGTH_ length
154 #define _UNPK_ (\x->x)
155 #define _SUBSTR_ substr{-from Utils-}
157 #define _CONCAT_ concat
161 {- To avoid confusion with Haskell 1.3, we use Swahili.
163 data Maybe a = Nothing | Just a
164 data Labda a = Hamna | Ni a
166 Should we ever need to increase confusion with HBC, we will
169 data Kanske a = Ingenting | Bara a
173 # define Nothing Hamna
177 # define NOTHING Hamna