[project @ 2001-08-04 06:19:54 by ken]
[ghc-hetmet.git] / ghc / lib / std / PrelGHC.hi-boot.pp
1 ---------------------------------------------------------------------------
2 --                              PrelGHC.hi-boot
3 -- 
4 --      This hand-written interface file allows you to bring into scope the 
5 --      primitive operations and types that GHC knows about.
6 ---------------------------------------------------------------------------
7
8 #include "config.h"
9 #include "Derived.h"
10
11 __interface "std" PrelGHC 1 0 where
12
13 __export PrelGHC
14
15   ZLzmzgZR      -- (->)
16
17   CCallable
18   CReturnable
19
20 -- Magical assert thingy
21   assert
22
23   -- constructor tags
24   tagToEnumzh
25   getTagzh
26   dataToTagzh
27
28   -- I/O primitives
29   RealWorld
30   realWorldzh
31   Statezh
32
33   -- Concurrency primitives
34   ThreadIdzh
35   myThreadIdzh
36   forkzh
37   yieldzh
38   killThreadzh
39   blockAsyncExceptionszh
40   unblockAsyncExceptionszh
41   delayzh
42   waitReadzh
43   waitWritezh
44
45   -- MVars
46   MVarzh
47   sameMVarzh
48   newMVarzh
49   takeMVarzh
50   putMVarzh
51   tryTakeMVarzh
52   tryPutMVarzh
53   isEmptyMVarzh
54
55   -- Parallel
56   seqzh
57   parzh
58   parGlobalzh
59   parLocalzh
60   parAtzh
61   parAtAbszh
62   parAtRelzh
63   parAtForNowzh
64
65   -- Character Type
66   Charzh 
67   gtCharzh
68   geCharzh
69   eqCharzh
70   neCharzh
71   ltCharzh
72   leCharzh
73   ordzh
74   chrzh
75
76   -- Int Type
77   Intzh
78   zgzh
79   zgzezh
80   zezezh
81   zszezh
82   zlzh
83   zlzezh
84   zpzh
85   zmzh
86   ztzh
87   quotIntzh
88   remIntzh
89   gcdIntzh
90   negateIntzh
91   iShiftLzh
92   iShiftRAzh
93   iShiftRLzh
94   addIntCzh
95   subIntCzh
96   mulIntCzh
97
98   Wordzh
99   gtWordzh
100   geWordzh
101   eqWordzh
102   neWordzh
103   ltWordzh
104   leWordzh
105   plusWordzh
106   minusWordzh
107   timesWordzh
108   quotWordzh
109   remWordzh
110   andzh
111   orzh
112   notzh
113   xorzh
114   shiftLzh
115   shiftRLzh
116   int2Wordzh
117   word2Intzh
118
119   Int64zh
120   Word64zh
121
122   intToInt8zh
123   intToInt16zh
124   intToInt32zh
125   wordToWord8zh
126   wordToWord16zh
127   wordToWord32zh
128
129   Addrzh
130   gtAddrzh
131   geAddrzh
132   eqAddrzh
133   neAddrzh
134   ltAddrzh
135   leAddrzh
136   int2Addrzh
137   addr2Intzh
138
139   Floatzh
140   gtFloatzh
141   geFloatzh
142   eqFloatzh
143   neFloatzh
144   ltFloatzh
145   leFloatzh
146   plusFloatzh
147   minusFloatzh
148   timesFloatzh
149   divideFloatzh
150   negateFloatzh
151   float2Intzh
152   int2Floatzh
153   expFloatzh
154   logFloatzh
155   sqrtFloatzh
156   sinFloatzh
157   cosFloatzh
158   tanFloatzh
159   asinFloatzh
160   acosFloatzh
161   atanFloatzh
162   sinhFloatzh
163   coshFloatzh
164   tanhFloatzh
165   powerFloatzh
166   decodeFloatzh
167
168   Doublezh
169   zgzhzh
170   zgzezhzh
171   zezezhzh
172   zszezhzh
173   zlzhzh
174   zlzezhzh
175   zpzhzh
176   zmzhzh
177   ztzhzh
178   zszhzh
179   negateDoublezh
180   double2Intzh
181   int2Doublezh
182   double2Floatzh
183   float2Doublezh
184   expDoublezh
185   logDoublezh
186   sqrtDoublezh
187   sinDoublezh
188   cosDoublezh
189   tanDoublezh
190   asinDoublezh
191   acosDoublezh
192   atanDoublezh
193   sinhDoublezh
194   coshDoublezh
195   tanhDoublezh
196   ztztzhzh
197   decodeDoublezh
198
199   cmpIntegerzh
200   cmpIntegerIntzh
201   plusIntegerzh
202   minusIntegerzh
203   timesIntegerzh
204   gcdIntegerzh
205   quotIntegerzh
206   remIntegerzh
207   gcdIntegerzh
208   gcdIntegerIntzh
209   divExactIntegerzh
210   quotRemIntegerzh
211   divModIntegerzh
212   integer2Intzh
213   integer2Wordzh
214   int2Integerzh
215   word2Integerzh
216 #ifdef SUPPORT_LONG_LONGS
217   integerToInt64zh
218   integerToWord64zh
219   int64ToIntegerzh
220   word64ToIntegerzh
221 #endif
222   andIntegerzh
223   orIntegerzh
224   xorIntegerzh
225   complementIntegerzh
226
227   Arrayzh
228   ByteArrayzh
229   MutableArrayzh
230   MutableByteArrayzh
231
232   sameMutableArrayzh
233   sameMutableByteArrayzh
234
235   newArrayzh
236   newByteArrayzh
237
238   indexArrayzh
239   indexCharArrayzh
240   indexWideCharArrayzh
241   indexIntArrayzh
242   indexWordArrayzh
243   indexAddrArrayzh
244   indexFloatArrayzh
245   indexDoubleArrayzh
246   indexStablePtrArrayzh
247   indexInt8Arrayzh
248   indexInt16Arrayzh
249   indexInt32Arrayzh
250 #ifdef SUPPORT_LONG_LONGS
251   indexInt64Arrayzh
252 #endif
253   indexWord8Arrayzh
254   indexWord16Arrayzh
255   indexWord32Arrayzh
256 #ifdef SUPPORT_LONG_LONGS
257   indexWord64Arrayzh
258 #endif
259
260   readArrayzh
261   readCharArrayzh
262   readWideCharArrayzh
263   readIntArrayzh
264   readWordArrayzh
265   readAddrArrayzh
266   readFloatArrayzh
267   readDoubleArrayzh
268   readStablePtrArrayzh
269   readInt8Arrayzh
270   readInt16Arrayzh
271   readInt32Arrayzh
272 #ifdef SUPPORT_LONG_LONGS
273   readInt64Arrayzh
274 #endif
275   readWord8Arrayzh
276   readWord16Arrayzh
277   readWord32Arrayzh
278 #ifdef SUPPORT_LONG_LONGS
279   readWord64Arrayzh
280 #endif
281
282   writeArrayzh
283   writeCharArrayzh
284   writeWideCharArrayzh
285   writeIntArrayzh
286   writeWordArrayzh
287   writeAddrArrayzh
288   writeFloatArrayzh
289   writeDoubleArrayzh
290   writeStablePtrArrayzh
291   writeInt8Arrayzh
292   writeInt16Arrayzh
293   writeInt32Arrayzh
294 #ifdef SUPPORT_LONG_LONGS
295   writeInt64Arrayzh
296 #endif
297   writeWord8Arrayzh
298   writeWord16Arrayzh
299   writeWord32Arrayzh
300 #ifdef SUPPORT_LONG_LONGS
301   writeWord64Arrayzh
302 #endif
303
304   indexCharOffAddrzh
305   indexWideCharOffAddrzh
306   indexIntOffAddrzh
307   indexWordOffAddrzh
308   indexAddrOffAddrzh
309   indexFloatOffAddrzh
310   indexDoubleOffAddrzh
311   indexStablePtrOffAddrzh
312   indexInt8OffAddrzh
313   indexInt16OffAddrzh
314   indexInt32OffAddrzh
315 #ifdef SUPPORT_LONG_LONGS
316   indexInt64OffAddrzh
317 #endif
318   indexWord8OffAddrzh
319   indexWord16OffAddrzh
320   indexWord32OffAddrzh
321 #ifdef SUPPORT_LONG_LONGS
322   indexWord64OffAddrzh
323 #endif
324
325   readCharOffAddrzh
326   readWideCharOffAddrzh
327   readIntOffAddrzh
328   readWordOffAddrzh
329   readAddrOffAddrzh
330   readFloatOffAddrzh
331   readDoubleOffAddrzh
332   readStablePtrOffAddrzh
333   readInt8OffAddrzh
334   readInt16OffAddrzh
335   readInt32OffAddrzh
336 #ifdef SUPPORT_LONG_LONGS
337   readInt64OffAddrzh
338 #endif
339   readWord8OffAddrzh
340   readWord16OffAddrzh
341   readWord32OffAddrzh
342 #ifdef SUPPORT_LONG_LONGS
343   readWord64OffAddrzh
344 #endif
345
346   writeCharOffAddrzh
347   writeWideCharOffAddrzh
348   writeIntOffAddrzh
349   writeWordOffAddrzh
350   writeAddrOffAddrzh
351   writeForeignObjOffAddrzh
352   writeFloatOffAddrzh
353   writeDoubleOffAddrzh
354   writeStablePtrOffAddrzh
355   writeInt8OffAddrzh
356   writeInt16OffAddrzh
357   writeInt32OffAddrzh
358 #ifdef SUPPORT_LONG_LONGS
359   writeInt64OffAddrzh
360 #endif
361   writeWord8OffAddrzh
362   writeWord16OffAddrzh
363   writeWord32OffAddrzh
364 #ifdef SUPPORT_LONG_LONGS
365   writeWord64OffAddrzh
366 #endif
367
368   eqForeignObjzh
369   indexCharOffForeignObjzh
370   indexWideCharOffForeignObjzh
371   indexIntOffForeignObjzh
372   indexWordOffForeignObjzh
373   indexAddrOffForeignObjzh
374   indexFloatOffForeignObjzh
375   indexDoubleOffForeignObjzh
376   indexStablePtrOffForeignObjzh
377   indexInt8OffForeignObjzh
378   indexInt16OffForeignObjzh
379   indexInt32OffForeignObjzh
380 #ifdef SUPPORT_LONG_LONGS
381   indexInt64OffForeignObjzh
382 #endif
383   indexWord8OffForeignObjzh
384   indexWord16OffForeignObjzh
385   indexWord32OffForeignObjzh
386 #ifdef SUPPORT_LONG_LONGS
387   indexWord64OffForeignObjzh
388 #endif
389
390   unsafeFreezzeArrayzh          -- Note zz in the middle
391   unsafeFreezzeByteArrayzh      -- Ditto
392
393   unsafeThawArrayzh
394
395   sizzeofByteArrayzh            -- Ditto
396   sizzeofMutableByteArrayzh     -- Ditto
397
398   MutVarzh
399   newMutVarzh
400   readMutVarzh
401   writeMutVarzh
402   sameMutVarzh
403
404   catchzh
405   raisezh
406
407   Weakzh
408   mkWeakzh
409   deRefWeakzh
410   finalizzeWeakzh
411
412   ForeignObjzh
413   mkForeignObjzh
414   writeForeignObjzh
415   foreignObjToAddrzh
416   touchzh
417
418   StablePtrzh
419   makeStablePtrzh
420   deRefStablePtrzh
421   eqStablePtrzh
422
423   StableNamezh
424   makeStableNamezh
425   eqStableNamezh
426   stableNameToIntzh
427
428   reallyUnsafePtrEqualityzh
429
430   newBCOzh
431   BCOzh
432   mkApUpd0zh
433
434   unsafeCoercezh
435   addrToHValuezh
436 ;
437
438 -- Export PrelErr.error, so that others do not have to import PrelErr
439 __export PrelErr error ;
440
441
442 --------------------------------------------------
443 instance {CCallable Charzh} = zdfCCallableCharzh;
444 instance {CCallable Doublezh} = zdfCCallableDoublezh;
445 instance {CCallable Floatzh} = zdfCCallableFloatzh;
446 instance {CCallable Intzh} = zdfCCallableIntzh;
447 instance {CCallable Addrzh} = zdfCCallableAddrzh;
448 instance {CCallable Int64zh} = zdfCCallableInt64zh;
449 instance {CCallable Word64zh} = zdfCCallableWord64zh;
450 instance {CCallable Wordzh} = zdfCCallableWordzh;
451 instance {CCallable ByteArrayzh} = zdfCCallableByteArrayzh;
452 instance __forall s => {CCallable (MutableByteArrayzh s)} = zdfCCallableMutableByteArrayzh;
453 instance {CCallable ForeignObjzh} = zdfCCallableForeignObjzh;
454 instance __forall s => {CCallable (StablePtrzh s)} = zdfCCallableStablePtrzh;
455 -- CCallable and CReturnable have kind (Type AnyBox) so that
456 -- things like Int# can be instances of CCallable. 
457 1 class CCallable a :: ? ;
458 1 class CReturnable a :: ? ;
459
460 1 assert :: __forall a => PrelBase.Bool -> a -> a ;
461
462 -- These guys do not really exist:
463 --
464 1 zdfCCallableCharzh :: {CCallable Charzh} ;
465 1 zdfCCallableDoublezh :: {CCallable Doublezh} ;
466 1 zdfCCallableFloatzh :: {CCallable Floatzh} ;
467 1 zdfCCallableIntzh :: {CCallable Intzh} ;
468 1 zdfCCallableAddrzh :: {CCallable Addrzh} ;
469 1 zdfCCallableInt64zh :: {CCallable Int64zh} ;
470 1 zdfCCallableWord64zh :: {CCallable Word64zh} ;
471 1 zdfCCallableWordzh :: {CCallable Wordzh} ;
472 1 zdfCCallableByteArrayzh :: {CCallable ByteArrayzh} ;
473 1 zdfCCallableMutableByteArrayzh :: __forall s => {CCallable (MutableByteArrayzh s)} ;
474 1 zdfCCallableForeignObjzh :: {CCallable ForeignObjzh} ;
475 1 zdfCCallableStablePtrzh :: __forall a => {CCallable (StablePtrzh a)} ;