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
60 -- ToDo: ghci needs to load far too many bits of the backend because
61 -- this ATTACK_PRAGMA stuff encourages Utils.lhs to tell
62 -- everyone about everyone else. I guess we need to add some
63 -- more conditional stuff in.
64 #ifdef USE_ATTACK_PRAGMAS
65 #define IF_ATTACK_PRAGMAS(x) x
67 #define IF_ATTACK_PRAGMAS(x) {--}
71 #define IF_GHCI(stuff) stuff
73 #define IF_GHCI(stuff) {-nothing-}
76 #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 26
80 #if defined(__GLASGOW_HASKELL__)
83 #define IBOX(x) (I# (x))
84 #define _ADD_ `plusInt#`
85 #define _SUB_ `minusInt#`
86 #define _MUL_ `timesInt#`
87 #define _DIV_ `divInt#`
88 #define _QUOT_ `quotInt#`
89 #define _NEG_ negateInt#
96 #define FAST_BOOL Int#
99 #define _IS_TRUE_(x) ((x) `eqInt#` 1#)
101 #else {- ! __GLASGOW_HASKELL__ -}
110 #define _QUOT_ `quot`
118 #define FAST_BOOL Bool
120 #define _FALSE_ False
121 #define _IS_TRUE_(x) (x)
123 #endif {- ! __GLASGOW_HASKELL__ -}
125 #if __GLASGOW_HASKELL__ >= 23
126 #define USE_FAST_STRINGS 1
127 #define FAST_STRING _PackedString
128 #define SLIT(x) (_packCString (A# x#))
129 #define _CMP_STRING_ cmpPString
130 #define _NULL_ _nullPS
132 #define _CONS_ _consPS
133 #define _HEAD_ _headPS
134 #define _TAIL_ _tailPS
135 #define _LENGTH_ _lengthPS
136 #define _PK_ _packString
137 #define _UNPK_ _unpackPS
138 #define _SUBSTR_ _substrPS
139 #define _APPEND_ `_appendPS`
140 #define _CONCAT_ _concatPS
142 #define FAST_STRING String
144 #define _CMP_STRING_ cmpString
150 #define _LENGTH_ length
152 #define _UNPK_ (\x->x)
153 #define _SUBSTR_ substr{-from Utils-}
155 #define _CONCAT_ concat
159 {- To avoid confusion with Haskell 1.3, we use Swahili.
161 data Maybe a = Nothing | Just a
162 data Labda a = Hamna | Ni a
164 Should we ever need to increase confusion with HBC, we will
167 data Kanske a = Ingenting | Bara a
171 # define Nothing Hamna
175 # define NOTHING Hamna