[project @ 2000-09-06 10:23:52 by simonmar]
[ghc-hetmet.git] / ghc / compiler / prelude / primops.txt
1 -----------------------------------------------------------------------
2 -- $Id: primops.txt,v 1.2 2000/08/21 13:34:06 simonmar Exp $
3 --
4 -- Primitive Operations
5 --
6 -----------------------------------------------------------------------
7
8 -- To add a new primop, you currently need to update the following files:
9 --
10 --      - this file (ghc/compiler/prelude/primops.txt), which includes
11 --        the type of the primop, and various other properties (its
12 --        strictness attributes, whether it is defined as a macro
13 --        or as out-of-line code, etc.)
14 --
15 --      - ghc/lib/std/PrelGHC.hi-boot, to declare the primop
16 --
17 --      - if the primop is inline (i.e. a macro), then:
18 --              ghc/includes/PrimOps.h
19 --              ghc/compiler/nativeGen/StixPrim.lhs
20 --
21 --      - or, for an out-of-line primop:
22 --              ghc/includes/PrimOps.h (just add the declaration)
23 --              ghc/rts/PrimOps.hc     (define it here)
24 --
25 --      - the User's Guide
26 --
27
28 -- The default attribute values which apply if you don't specify
29 -- other ones.  Attribute values can be True, False, or arbitrary
30 -- text between curly brackets.  This is a kludge to enable 
31 -- processors of this file to easily get hold of simple info
32 -- (eg, out_of_line), whilst avoiding parsing complex expressions
33 -- needed for strictness and usage info.
34
35 defaults
36    has_side_effects = False
37    out_of_line      = False
38    commutable       = False
39    needs_wrapper    = False
40    can_fail         = False
41    strictness       = { \ arity -> StrictnessInfo (replicate arity wwPrim) False }
42    usage            = { nomangle other }
43
44 ------------------------------------------------------------------------
45 --- Addr#                                                            ---
46 ------------------------------------------------------------------------
47
48 primop   AddrGtOp  "gtAddr#"   Compare   Addr# -> Addr# -> Bool
49 primop   AddrGeOp  "geAddr#"   Compare   Addr# -> Addr# -> Bool
50 primop   AddrEqOp  "eqAddr#"   Compare   Addr# -> Addr# -> Bool
51 primop   AddrNeOp  "neAddr#"   Compare   Addr# -> Addr# -> Bool
52 primop   AddrLtOp  "ltAddr#"   Compare   Addr# -> Addr# -> Bool
53 primop   AddrLeOp  "leAddr#"   Compare   Addr# -> Addr# -> Bool
54
55 primop   Addr2IntOp  "addr2Int#"     GenPrimOp   Addr# -> Int#
56
57 primop   Addr2IntegerOp  "addr2Integer#" GenPrimOp   
58    Addr# -> (# Int#, ByteArr# #)
59    with out_of_line = True
60
61
62 ------------------------------------------------------------------------
63 --- Char#                                                            ---
64 ------------------------------------------------------------------------
65
66 primop   CharGtOp  "gtChar#"   Compare   Char# -> Char# -> Bool
67 primop   CharGeOp  "geChar#"   Compare   Char# -> Char# -> Bool
68
69 primop   CharEqOp  "eqChar#"   Compare
70    Char# -> Char# -> Bool
71    with commutable = True
72
73 primop   CharNeOp  "neChar#"   Compare
74    Char# -> Char# -> Bool
75    with commutable = True
76
77 primop   CharLtOp  "ltChar#"   Compare   Char# -> Char# -> Bool
78 primop   CharLeOp  "leChar#"   Compare   Char# -> Char# -> Bool
79
80 primop   OrdOp   "ord#"  GenPrimOp   Char# -> Int#
81
82 ------------------------------------------------------------------------
83 --- Double#                                                          ---
84 ------------------------------------------------------------------------
85
86 primop   DoubleGtOp ">##"   Compare   Double# -> Double# -> Bool
87 primop   DoubleGeOp ">=##"   Compare   Double# -> Double# -> Bool
88
89 primop DoubleEqOp "==##"   Compare
90    Double# -> Double# -> Bool
91    with commutable = True
92
93 primop DoubleNeOp "/=##"   Compare
94    Double# -> Double# -> Bool
95    with commutable = True
96
97 primop   DoubleLtOp "<##"   Compare   Double# -> Double# -> Bool
98 primop   DoubleLeOp "<=##"   Compare   Double# -> Double# -> Bool
99
100 primop   DoubleAddOp   "+##"   Dyadic
101    Double# -> Double# -> Double#
102    with commutable = True
103
104 primop   DoubleSubOp   "-##"   Dyadic   Double# -> Double# -> Double#
105
106 primop   DoubleMulOp   "*##"   Dyadic
107    Double# -> Double# -> Double#
108    with commutable = True
109
110 primop   DoubleDivOp   "/##"   Dyadic
111    Double# -> Double# -> Double#
112    with can_fail = True
113
114 primop   DoubleNegOp   "negateDouble#"  Monadic   Double# -> Double#
115
116 primop   Double2IntOp   "double2Int#"          GenPrimOp  Double# -> Int#
117 primop   Double2FloatOp   "double2Float#" GenPrimOp Double# -> Float#
118
119 primop   DoubleExpOp   "expDouble#"      Monadic
120    Double# -> Double#
121    with needs_wrapper = True
122
123 primop   DoubleLogOp   "logDouble#"      Monadic         
124    Double# -> Double#
125    with
126    needs_wrapper = True
127    can_fail = True
128
129 primop   DoubleSqrtOp   "sqrtDouble#"      Monadic  
130    Double# -> Double#
131    with needs_wrapper = True
132
133 primop   DoubleSinOp   "sinDouble#"      Monadic          
134    Double# -> Double#
135    with needs_wrapper = True
136
137 primop   DoubleCosOp   "cosDouble#"      Monadic          
138    Double# -> Double#
139    with needs_wrapper = True
140
141 primop   DoubleTanOp   "tanDouble#"      Monadic          
142    Double# -> Double#
143    with needs_wrapper = True
144
145 primop   DoubleAsinOp   "asinDouble#"      Monadic 
146    Double# -> Double#
147    with
148    needs_wrapper = True
149    can_fail = True
150
151 primop   DoubleAcosOp   "acosDouble#"      Monadic  
152    Double# -> Double#
153    with
154    needs_wrapper = True
155    can_fail = True
156
157 primop   DoubleAtanOp   "atanDouble#"      Monadic  
158    Double# -> Double#
159    with
160    needs_wrapper = True
161
162 primop   DoubleSinhOp   "sinhDouble#"      Monadic  
163    Double# -> Double#
164    with needs_wrapper = True
165
166 primop   DoubleCoshOp   "coshDouble#"      Monadic  
167    Double# -> Double#
168    with needs_wrapper = True
169
170 primop   DoubleTanhOp   "tanhDouble#"      Monadic  
171    Double# -> Double#
172    with needs_wrapper = True
173
174 primop   DoublePowerOp   "**##" Dyadic  
175    Double# -> Double# -> Double#
176    with needs_wrapper = True
177
178 primop   DoubleDecodeOp   "decodeDouble#" GenPrimOp    
179    Double# -> (# Int#, Int#, ByteArr# #)
180    with out_of_line = True
181
182 ------------------------------------------------------------------------
183 --- Float#                                                            ---
184 ------------------------------------------------------------------------
185
186 primop   FloatGtOp  "gtFloat#"   Compare   Float# -> Float# -> Bool
187 primop   FloatGeOp  "geFloat#"   Compare   Float# -> Float# -> Bool
188
189 primop   FloatEqOp  "eqFloat#"   Compare
190    Float# -> Float# -> Bool
191    with commutable = True
192
193 primop   FloatNeOp  "neFloat#"   Compare
194    Float# -> Float# -> Bool
195    with commutable = True
196
197 primop   FloatLtOp  "ltFloat#"   Compare   Float# -> Float# -> Bool
198 primop   FloatLeOp  "leFloat#"   Compare   Float# -> Float# -> Bool
199
200 primop   FloatAddOp   "plusFloat#"      Dyadic            
201    Float# -> Float# -> Float#
202    with commutable = True
203
204 primop   FloatSubOp   "minusFloat#"      Dyadic      Float# -> Float# -> Float#
205
206 primop   FloatMulOp   "timesFloat#"      Dyadic    
207    Float# -> Float# -> Float#
208    with commutable = True
209
210 primop   FloatDivOp   "divideFloat#"      Dyadic  
211    Float# -> Float# -> Float#
212    with can_fail = True
213
214 primop   FloatNegOp   "negateFloat#"      Monadic    Float# -> Float#
215
216 primop   Float2IntOp   "float2Int#"      GenPrimOp  Float# -> Int#
217
218 primop   FloatExpOp   "expFloat#"      Monadic          
219    Float# -> Float#
220    with needs_wrapper = True
221
222 primop   FloatLogOp   "logFloat#"      Monadic          
223    Float# -> Float#
224    with needs_wrapper = True
225         can_fail = True
226
227 primop   FloatSqrtOp   "sqrtFloat#"      Monadic          
228    Float# -> Float#
229    with needs_wrapper = True
230
231 primop   FloatSinOp   "sinFloat#"      Monadic          
232    Float# -> Float#
233    with needs_wrapper = True
234
235 primop   FloatCosOp   "cosFloat#"      Monadic          
236    Float# -> Float#
237    with needs_wrapper = True
238
239 primop   FloatTanOp   "tanFloat#"      Monadic          
240    Float# -> Float#
241    with needs_wrapper = True
242
243 primop   FloatAsinOp   "asinFloat#"      Monadic          
244    Float# -> Float#
245    with needs_wrapper = True
246         can_fail = True
247
248 primop   FloatAcosOp   "acosFloat#"      Monadic          
249    Float# -> Float#
250    with needs_wrapper = True
251         can_fail = True
252
253 primop   FloatAtanOp   "atanFloat#"      Monadic          
254    Float# -> Float#
255    with needs_wrapper = True
256
257 primop   FloatSinhOp   "sinhFloat#"      Monadic          
258    Float# -> Float#
259    with needs_wrapper = True
260
261 primop   FloatCoshOp   "coshFloat#"      Monadic          
262    Float# -> Float#
263    with needs_wrapper = True
264
265 primop   FloatTanhOp   "tanhFloat#"      Monadic          
266    Float# -> Float#
267    with needs_wrapper = True
268
269 primop   FloatPowerOp   "powerFloat#"      Dyadic   
270    Float# -> Float# -> Float#
271    with needs_wrapper = True
272
273 primop   Float2DoubleOp   "float2Double#" GenPrimOp  Float# -> Double#
274
275 primop   FloatDecodeOp   "decodeFloat#" GenPrimOp
276    Float# -> (# Int#, Int#, ByteArr# #)
277    with out_of_line = True
278
279 ------------------------------------------------------------------------
280 --- Int#                                                             ---
281 ------------------------------------------------------------------------
282
283 primop   IntAddOp    "+#"    Dyadic
284    Int# -> Int# -> Int#
285    with commutable = True
286
287 primop   IntSubOp    "-#"    Dyadic   Int# -> Int# -> Int#
288
289 primop   IntMulOp    "*#" 
290    Dyadic   Int# -> Int# -> Int#
291    with commutable = True
292
293 primop   IntQuotOp    "quotInt#"    Dyadic
294    Int# -> Int# -> Int#
295    with can_fail = True
296
297 primop   IntRemOp    "remInt#"    Dyadic
298    Int# -> Int# -> Int#
299    with can_fail = True
300
301 primop   IntGcdOp    "gcdInt#"    Dyadic   Int# -> Int# -> Int#
302 primop   IntNegOp    "negateInt#"    Monadic   Int# -> Int#
303 primop   IntAddCOp   "addIntC#"    GenPrimOp   Int# -> Int# -> (# Int#, Int# #)
304 primop   IntSubCOp   "subIntC#"    GenPrimOp   Int# -> Int# -> (# Int#, Int# #)
305 primop   IntMulCOp   "mulIntC#"    GenPrimOp   Int# -> Int# -> (# Int#, Int# #)
306 primop   IntGtOp  ">#"   Compare   Int# -> Int# -> Bool
307 primop   IntGeOp  ">=#"   Compare   Int# -> Int# -> Bool
308
309 primop   IntEqOp  "==#"   Compare
310    Int# -> Int# -> Bool
311    with commutable = True
312
313 primop   IntNeOp  "/=#"   Compare
314    Int# -> Int# -> Bool
315    with commutable = True
316
317 primop   IntLtOp  "<#"   Compare   Int# -> Int# -> Bool
318 primop   IntLeOp  "<=#"   Compare   Int# -> Int# -> Bool
319
320 primop   ChrOp   "chr#"   GenPrimOp   Int# -> Char#
321
322 primop   Int2WordOp "int2Word#" GenPrimOp Int# -> Word#
323 primop   Int2AddrOp   "int2Addr#"GenPrimOp  Int# -> Addr#
324 primop   Int2FloatOp   "int2Float#"      GenPrimOp  Int# -> Float#
325 primop   Int2DoubleOp   "int2Double#"          GenPrimOp  Int# -> Double#
326
327 primop   Int2IntegerOp    "int2Integer#"
328    GenPrimOp Int# -> (# Int#, ByteArr# #)
329    with out_of_line = True
330
331 primop   ISllOp   "iShiftL#" GenPrimOp  Int# -> Int# -> Int#
332 primop   ISraOp   "iShiftRA#" GenPrimOp Int# -> Int# -> Int#
333 primop   ISrlOp   "iShiftRL#" GenPrimOp Int# -> Int# -> Int#
334
335 ------------------------------------------------------------------------
336 --- Int64#                                                           ---
337 ------------------------------------------------------------------------
338
339 primop   Int64ToIntegerOp   "int64ToInteger#" GenPrimOp 
340    Int64# -> (# Int#, ByteArr# #)
341    with out_of_line = True
342
343
344 ------------------------------------------------------------------------
345 --- Integer#                                                         ---
346 ------------------------------------------------------------------------
347
348 primop   IntegerNegOp   "negateInteger#" GenPrimOp    
349    Int# -> ByteArr# -> (# Int#, ByteArr# #)
350
351 primop   IntegerAddOp   "plusInteger#" GenPrimOp   
352    Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
353    with commutable = True
354         out_of_line = True
355
356 primop   IntegerSubOp   "minusInteger#" GenPrimOp  
357    Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
358    with out_of_line = True
359
360 primop   IntegerMulOp   "timesInteger#" GenPrimOp   
361    Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
362    with commutable = True
363         out_of_line = True
364
365 primop   IntegerGcdOp   "gcdInteger#" GenPrimOp    
366    Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
367    with commutable = True
368         out_of_line = True
369
370 primop   IntegerIntGcdOp   "gcdIntegerInt#" GenPrimOp
371    Int# -> ByteArr# -> Int# -> Int#
372    with commutable = True
373
374 primop   IntegerDivExactOp   "divExactInteger#" GenPrimOp
375    Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
376    with out_of_line = True
377
378 primop   IntegerQuotOp   "quotInteger#" GenPrimOp
379    Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
380    with out_of_line = True
381
382 primop   IntegerRemOp   "remInteger#" GenPrimOp
383    Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
384    with out_of_line = True
385
386 primop   IntegerCmpOp   "cmpInteger#"   GenPrimOp  
387    Int# -> ByteArr# -> Int# -> ByteArr# -> Int#
388    with needs_wrapper = True
389
390 primop   IntegerCmpIntOp   "cmpIntegerInt#" GenPrimOp
391    Int# -> ByteArr# -> Int# -> Int#
392    with needs_wrapper = True
393
394 primop   IntegerQuotRemOp   "quotRemInteger#" GenPrimOp
395    Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr#, Int#, ByteArr# #)
396    with can_fail = True
397         out_of_line = True
398
399 primop   IntegerDivModOp    "divModInteger#"  GenPrimOp
400    Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr#, Int#, ByteArr# #)
401    with can_fail = True
402         out_of_line = True
403
404 primop   Integer2IntOp   "integer2Int#"    GenPrimOp
405    Int# -> ByteArr# -> Int#
406    with needs_wrapper = True
407
408 primop   Integer2WordOp   "integer2Word#"   GenPrimOp
409    Int# -> ByteArr# -> Word#
410    with needs_wrapper = True
411
412 primop   IntegerToInt64Op   "integerToInt64#" GenPrimOp
413    Int# -> ByteArr# -> Int64#
414
415 primop   IntegerToWord64Op   "integerToWord64#" GenPrimOp
416    Int# -> ByteArr# -> Word64#
417
418 ------------------------------------------------------------------------
419 --- Word#                                                            ---
420 ------------------------------------------------------------------------
421
422 primop   WordQuotOp   "quotWord#" Dyadic  Word# -> Word# -> Word#
423 primop   WordRemOp   "remWord#" Dyadic          Word# -> Word# -> Word#
424
425 primop   AndOp   "and#"  Dyadic      
426    Word# -> Word# -> Word#
427    with commutable = True
428
429 primop   OrOp   "or#"          Dyadic      
430    Word# -> Word# -> Word#
431    with commutable = True
432
433 primop   XorOp   "xor#"  Dyadic      
434    Word# -> Word# -> Word#
435    with commutable = True
436
437 primop   NotOp   "not#"  Monadic        Word# -> Word#
438
439 primop   SllOp   "shiftL#" GenPrimOp  Word# -> Int# -> Word#
440 primop   SrlOp   "shiftRL#" GenPrimOp Word# -> Int# -> Word#
441
442
443 primop   Word2IntOp "word2Int#" GenPrimOp Word# -> Int#
444
445 primop   Word2IntegerOp   "word2Integer#" GenPrimOp 
446    Word# -> (# Int#, ByteArr# #)
447    with out_of_line = True
448
449 primop   WordGtOp  "gtWord#"   Compare   Word# -> Word# -> Bool
450 primop   WordGeOp  "geWord#"   Compare   Word# -> Word# -> Bool
451 primop   WordEqOp  "eqWord#"   Compare   Word# -> Word# -> Bool
452 primop   WordNeOp  "neWord#"   Compare   Word# -> Word# -> Bool
453 primop   WordLtOp  "ltWord#"   Compare   Word# -> Word# -> Bool
454 primop   WordLeOp  "leWord#"   Compare   Word# -> Word# -> Bool
455
456 ------------------------------------------------------------------------
457 --- Word64#                                                          ---
458 ------------------------------------------------------------------------
459
460 primop   Word64ToIntegerOp   "word64ToInteger#" GenPrimOp
461    Word64# -> (# Int#, ByteArr# #)
462    with out_of_line = True
463
464
465 ------------------------------------------------------------------------
466 --- Arrays                                                           ---
467 ------------------------------------------------------------------------
468
469 primop  NewByteArrayOp_Char "newCharArray#" GenPrimOp
470    Int# -> State# s -> (# State# s, MutByteArr# s #)
471    with out_of_line = True
472
473 primop  NewByteArrayOp_Int "newIntArray#" GenPrimOp
474    Int# -> State# s -> (# State# s, MutByteArr# s #)
475    with out_of_line = True
476
477 primop  NewByteArrayOp_Word "newWordArray#" GenPrimOp
478    Int# -> State# s -> (# State# s, MutByteArr# s #)
479    with out_of_line = True
480
481 primop  NewByteArrayOp_Addr "newAddrArray#" GenPrimOp
482    Int# -> State# s -> (# State# s, MutByteArr# s #)
483    with out_of_line = True
484
485 primop  NewByteArrayOp_Float "newFloatArray#" GenPrimOp
486    Int# -> State# s -> (# State# s, MutByteArr# s #)
487    with out_of_line = True
488
489 primop  NewByteArrayOp_Double "newDoubleArray#" GenPrimOp
490    Int# -> State# s -> (# State# s, MutByteArr# s #)
491    with out_of_line = True
492
493 primop  NewByteArrayOp_StablePtr "newStablePtrArray#" GenPrimOp
494    Int# -> State# s -> (# State# s, MutByteArr# s #)
495    with out_of_line = True
496
497
498
499 primop  ReadByteArrayOp_Char "readCharArray#" GenPrimOp
500    MutByteArr# s -> Int# -> State# s -> (# State# s, Char# #)
501
502 primop  ReadByteArrayOp_Int "readIntArray#" GenPrimOp
503    MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
504
505 primop  ReadByteArrayOp_Word "readWordArray#" GenPrimOp
506    MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
507
508 primop  ReadByteArrayOp_Addr "readAddrArray#" GenPrimOp
509    MutByteArr# s -> Int# -> State# s -> (# State# s, Addr# #)
510
511 primop  ReadByteArrayOp_Float "readFloatArray#" GenPrimOp
512    MutByteArr# s -> Int# -> State# s -> (# State# s, Float# #)
513
514 primop  ReadByteArrayOp_Double "readDoubleArray#" GenPrimOp
515    MutByteArr# s -> Int# -> State# s -> (# State# s, Double# #)
516
517 primop  ReadByteArrayOp_StablePtr "readStablePtrArray#" GenPrimOp
518    MutByteArr# s -> Int# -> State# s -> (# State# s, StablePtr# a #)
519
520 primop  ReadByteArrayOp_Int64 "readInt64Array#" GenPrimOp
521    MutByteArr# s -> Int# -> State# s -> (# State# s, Int64# #)
522
523 primop  ReadByteArrayOp_Word64 "readWord64Array#" GenPrimOp
524    MutByteArr# s -> Int# -> State# s -> (# State# s, Word64# #)
525
526
527
528 primop  WriteByteArrayOp_Char "writeCharArray#" GenPrimOp
529    MutByteArr# s -> Int# -> Char# -> State# s -> State# s
530    with has_side_effects = True
531
532 primop  WriteByteArrayOp_Int "writeIntArray#" GenPrimOp
533    MutByteArr# s -> Int# -> Int# -> State# s -> State# s
534    with has_side_effects = True
535
536 primop  WriteByteArrayOp_Word "writeWordArray#" GenPrimOp
537    MutByteArr# s -> Int# -> Word# -> State# s -> State# s
538    with has_side_effects = True
539
540 primop  WriteByteArrayOp_Addr "writeAddrArray#" GenPrimOp
541    MutByteArr# s -> Int# -> Addr# -> State# s -> State# s
542    with has_side_effects = True
543
544 primop  WriteByteArrayOp_Float "writeFloatArray#" GenPrimOp
545    MutByteArr# s -> Int# -> Float# -> State# s -> State# s
546    with has_side_effects = True
547
548 primop  WriteByteArrayOp_Double "writeDoubleArray#" GenPrimOp
549    MutByteArr# s -> Int# -> Double# -> State# s -> State# s
550    with has_side_effects = True
551
552 primop  WriteByteArrayOp_StablePtr "writeStablePtrArray#" GenPrimOp
553    MutByteArr# s -> Int# -> StablePtr# a -> State# s -> State# s
554    with has_side_effects = True
555
556 primop  WriteByteArrayOp_Int64 "writeInt64Array#" GenPrimOp
557    MutByteArr# s -> Int# -> Int64# -> State# s -> State# s
558    with has_side_effects = True
559
560 primop  WriteByteArrayOp_Word64 "writeWord64Array#" GenPrimOp
561    MutByteArr# s -> Int# -> Word64# -> State# s -> State# s
562    with has_side_effects = True
563
564
565 primop IndexByteArrayOp_Char "indexCharArray#" GenPrimOp
566    ByteArr# -> Int# -> Char#
567
568 primop IndexByteArrayOp_Int "indexIntArray#" GenPrimOp
569    ByteArr# -> Int# -> Int#
570
571 primop IndexByteArrayOp_Word "indexWordArray#" GenPrimOp
572    ByteArr# -> Int# -> Word#
573
574 primop IndexByteArrayOp_Addr "indexAddrArray#" GenPrimOp
575    ByteArr# -> Int# -> Addr#
576
577 primop IndexByteArrayOp_Float "indexFloatArray#" GenPrimOp
578    ByteArr# -> Int# -> Float#
579
580 primop IndexByteArrayOp_Double "indexDoubleArray#" GenPrimOp
581    ByteArr# -> Int# -> Double#
582
583 primop IndexByteArrayOp_StablePtr "indexStablePtrArray#" GenPrimOp
584    ByteArr# -> Int# -> StablePtr# a
585
586 primop IndexByteArrayOp_Int64 "indexInt64Array#" GenPrimOp
587    ByteArr# -> Int# -> Int64#
588
589 primop IndexByteArrayOp_Word64 "indexWord64Array#" GenPrimOp
590    ByteArr# -> Int# -> Word64#
591
592
593 primop IndexOffAddrOp_Char "indexCharOffAddr#" GenPrimOp
594    Addr# -> Int# -> Char#
595
596 primop IndexOffAddrOp_Int "indexIntOffAddr#" GenPrimOp
597    Addr# -> Int# -> Int#
598
599 primop IndexOffAddrOp_Word "indexWordOffAddr#" GenPrimOp
600    Addr# -> Int# -> Word#
601
602 primop IndexOffAddrOp_Addr "indexAddrOffAddr#" GenPrimOp
603    Addr# -> Int# -> Addr#
604
605 primop IndexOffAddrOp_Float "indexFloatOffAddr#" GenPrimOp
606    Addr# -> Int# -> Float#
607
608 primop IndexOffAddrOp_Double "indexDoubleOffAddr#" GenPrimOp
609    Addr# -> Int# -> Double#
610
611 primop IndexOffAddrOp_StablePtr "indexStablePtrOffAddr#" GenPrimOp
612    Addr# -> Int# -> StablePtr# a
613
614 primop IndexOffAddrOp_Int64 "indexInt64OffAddr#" GenPrimOp
615    Addr# -> Int# -> Int64#
616
617 primop IndexOffAddrOp_Word64 "indexWord64OffAddr#" GenPrimOp
618    Addr# -> Int# -> Word64#
619
620
621 primop IndexOffForeignObjOp_Char "indexCharOffForeignObj#" GenPrimOp
622    ForeignObj# -> Int# -> Char#
623
624 primop IndexOffForeignObjOp_Int "indexIntOffForeignObj#" GenPrimOp
625    ForeignObj# -> Int# -> Int#
626
627 primop IndexOffForeignObjOp_Word "indexWordOffForeignObj#" GenPrimOp
628    ForeignObj# -> Int# -> Word#
629
630 primop IndexOffForeignObjOp_Addr "indexAddrOffForeignObj#" GenPrimOp
631    ForeignObj# -> Int# -> Addr#
632
633 primop IndexOffForeignObjOp_Float "indexFloatOffForeignObj#" GenPrimOp
634    ForeignObj# -> Int# -> Float#
635
636 primop IndexOffForeignObjOp_Double "indexDoubleOffForeignObj#" GenPrimOp
637    ForeignObj# -> Int# -> Double#
638
639 primop IndexOffForeignObjOp_StablePtr "indexStablePtrOffForeignObj#" GenPrimOp
640    ForeignObj# -> Int# -> StablePtr# a
641
642 primop IndexOffForeignObjOp_Int64 "indexInt64OffForeignObj#" GenPrimOp
643    ForeignObj# -> Int# -> Int64#
644
645 primop IndexOffForeignObjOp_Word64 "indexWord64OffForeignObj#" GenPrimOp
646    ForeignObj# -> Int# -> Word64#
647
648
649
650 primop ReadOffAddrOp_Char "readCharOffAddr#" GenPrimOp
651    Addr# -> Int# -> State# s -> (# State# s, Char# #)
652
653 primop ReadOffAddrOp_Int "readIntOffAddr#" GenPrimOp
654    Addr# -> Int# -> State# s -> (# State# s, Int# #)
655
656 primop ReadOffAddrOp_Word "readWordOffAddr#" GenPrimOp
657    Addr# -> Int# -> State# s -> (# State# s, Word# #)
658
659 primop ReadOffAddrOp_Addr "readAddrOffAddr#" GenPrimOp
660    Addr# -> Int# -> State# s -> (# State# s, Addr# #)
661
662 primop ReadOffAddrOp_Float "readFloatOffAddr#" GenPrimOp
663    Addr# -> Int# -> State# s -> (# State# s, Float# #)
664
665 primop ReadOffAddrOp_Double "readDoubleOffAddr#" GenPrimOp
666    Addr# -> Int# -> State# s -> (# State# s, Double# #)
667
668 primop ReadOffAddrOp_StablePtr "readStablePtrOffAddr#" GenPrimOp
669    Addr# -> Int# -> State# s -> (# State# s, StablePtr# a #)
670
671 primop ReadOffAddrOp_ForeignObj "readForeignObjOffAddr#" GenPrimOp
672    Addr# -> Int# -> State# s -> (# State# s, ForeignObj# #)
673
674 primop ReadOffAddrOp_Int64 "readInt64OffAddr#" GenPrimOp
675    Addr# -> Int# -> State# s -> (# State# s, Int64# #)
676
677 primop ReadOffAddrOp_Word64 "readWord64OffAddr#" GenPrimOp
678    Addr# -> Int# -> State# s -> (# State# s, Word64# #)
679
680
681 primop  WriteOffAddrOp_Char "writeCharOffAddr#" GenPrimOp
682    Addr# -> Int# -> Char# -> State# s -> State# s
683    with has_side_effects = True
684
685 primop  WriteOffAddrOp_Int "writeIntOffAddr#" GenPrimOp
686    Addr# -> Int# -> Int# -> State# s -> State# s
687    with has_side_effects = True
688
689 primop  WriteOffAddrOp_Word "writeWordOffAddr#" GenPrimOp
690    Addr# -> Int# -> Word# -> State# s -> State# s
691    with has_side_effects = True
692
693 primop  WriteOffAddrOp_Addr "writeAddrOffAddr#" GenPrimOp
694    Addr# -> Int# -> Addr# -> State# s -> State# s
695    with has_side_effects = True
696
697 primop  WriteOffAddrOp_Float "writeFloatOffAddr#" GenPrimOp
698    Addr# -> Int# -> Float# -> State# s -> State# s
699    with has_side_effects = True
700
701 primop  WriteOffAddrOp_Double "writeDoubleOffAddr#" GenPrimOp
702    Addr# -> Int# -> Double# -> State# s -> State# s
703    with has_side_effects = True
704
705 primop  WriteOffAddrOp_StablePtr "writeStablePtrOffAddr#" GenPrimOp
706    Addr# -> Int# -> StablePtr# a -> State# s -> State# s
707    with has_side_effects = True
708
709 primop  WriteOffAddrOp_ForeignObj "writeForeignObjOffAddr#" GenPrimOp
710    Addr# -> Int# -> ForeignObj# -> State# s -> State# s
711    with has_side_effects = True
712
713 primop  WriteOffAddrOp_Int64 "writeInt64OffAddr#" GenPrimOp
714    Addr# -> Int# -> Int64# -> State# s -> State# s
715    with has_side_effects = True
716
717 primop  WriteOffAddrOp_Word64 "writeWord64OffAddr#" GenPrimOp
718    Addr# -> Int# -> Word64# -> State# s -> State# s
719    with has_side_effects = True
720
721
722
723 primop  NewArrayOp "newArray#" GenPrimOp
724    Int# -> a -> State# s -> (# State# s, MutArr# s a #)
725    with
726    strictness  = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
727    usage       = { mangle NewArrayOp [mkP, mkM, mkP] mkM }
728    out_of_line = True
729
730 primop  SameMutableArrayOp "sameMutableArray#" GenPrimOp
731    MutArr# s a -> MutArr# s a -> Bool
732    with
733    usage = { mangle SameMutableArrayOp [mkP, mkP] mkM }
734
735 primop  SameMutableByteArrayOp "sameMutableByteArray#" GenPrimOp
736    MutByteArr# s -> MutByteArr# s -> Bool
737
738 primop  ReadArrayOp "readArray#" GenPrimOp
739    MutArr# s a -> Int# -> State# s -> (# State# s, a #)
740    with
741    usage = { mangle ReadArrayOp [mkM, mkP, mkP] mkM }
742
743 primop  WriteArrayOp "writeArray#" GenPrimOp
744    MutArr# s a -> Int# -> a -> State# s -> State# s
745    with
746    usage            = { mangle WriteArrayOp [mkM, mkP, mkM, mkP] mkR }
747    strictness       = { \ arity -> StrictnessInfo [wwPrim, wwPrim, wwLazy, wwPrim] False }
748    has_side_effects = True
749
750 primop  IndexArrayOp "indexArray#" GenPrimOp
751    Array# a -> Int# -> (# a #)
752    with
753    usage = { mangle  IndexArrayOp [mkM, mkP] mkM }
754
755 primop  UnsafeFreezeArrayOp "unsafeFreezeArray#" GenPrimOp
756    MutArr# s a -> State# s -> (# State# s, Array# a #)
757    with
758    usage            = { mangle UnsafeFreezeArrayOp [mkM, mkP] mkM }
759    has_side_effects = True
760
761 primop  UnsafeFreezeByteArrayOp "unsafeFreezeByteArray#" GenPrimOp
762    MutByteArr# s -> State# s -> (# State# s, ByteArr# #)
763    with
764    has_side_effects = True
765
766 primop  UnsafeThawArrayOp  "unsafeThawArray#" GenPrimOp
767    Array# a -> State# s -> (# State# s, MutArr# s a #)
768    with
769    usage       = { mangle UnsafeThawArrayOp [mkM, mkP] mkM }
770    out_of_line = True
771
772 primop  SizeofByteArrayOp "sizeofByteArray#" GenPrimOp  
773    ByteArr# -> Int#
774
775 primop  SizeofMutableByteArrayOp "sizeofMutableByteArray#" GenPrimOp
776    MutByteArr# s -> Int#
777
778 ------------------------------------------------------------------------
779 --- Mutable variables                                                ---
780 ------------------------------------------------------------------------
781
782 primop  NewMutVarOp "newMutVar#" GenPrimOp
783    a -> State# s -> (# State# s, MutVar# s a #)
784    with
785    usage       = { mangle NewMutVarOp [mkM, mkP] mkM }
786    strictness  = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
787    out_of_line = True
788
789 primop  ReadMutVarOp "readMutVar#" GenPrimOp
790    MutVar# s a -> State# s -> (# State# s, a #)
791    with
792    usage = { mangle ReadMutVarOp [mkM, mkP] mkM }
793
794 primop  WriteMutVarOp "writeMutVar#"  GenPrimOp
795    MutVar# s a -> a -> State# s -> State# s
796    with
797    strictness       = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
798    usage            = { mangle WriteMutVarOp [mkM, mkM, mkP] mkR }
799    has_side_effects = True
800
801 primop  SameMutVarOp "sameMutVar#" GenPrimOp
802    MutVar# s a -> MutVar# s a -> Bool
803    with
804    usage = { mangle SameMutVarOp [mkP, mkP] mkM }
805
806 ------------------------------------------------------------------------
807 --- Exceptions                                                       ---
808 ------------------------------------------------------------------------
809
810 primop  CatchOp "catch#" GenPrimOp
811           (State# RealWorld -> (# State# RealWorld, a #) )
812        -> (b -> State# RealWorld -> (# State# RealWorld, a #) ) 
813        -> State# RealWorld
814        -> (# State# RealWorld, a #)
815    with
816    strictness = { \ arity -> StrictnessInfo [wwLazy, wwLazy, wwPrim] False }
817         -- Catch is actually strict in its first argument
818         -- but we don't want to tell the strictness
819         -- analyser about that!
820    usage = { mangle CatchOp [mkM, mkM . (inFun CatchOp mkM mkM), mkP] mkM }
821         --     [mkO, mkO . (inFun mkM mkO)] mkO
822         -- might use caught action multiply
823    out_of_line = True
824
825 primop  RaiseOp "raise#" GenPrimOp
826    a -> b
827    with
828    strictness  = { \ arity -> StrictnessInfo [wwLazy] True }
829       -- NB: True => result is bottom
830    usage       = { mangle RaiseOp [mkM] mkM }
831    out_of_line = True
832
833 primop  BlockAsyncExceptionsOp "blockAsyncExceptions#" GenPrimOp
834         (State# RealWorld -> (# State# RealWorld, a #))
835      -> (State# RealWorld -> (# State# RealWorld, a #))
836    with
837    strictness  = { \ arity -> StrictnessInfo [wwLazy] False }
838    out_of_line = True
839
840 primop  UnblockAsyncExceptionsOp "unblockAsyncExceptions#" GenPrimOp
841         (State# RealWorld -> (# State# RealWorld, a #))
842      -> (State# RealWorld -> (# State# RealWorld, a #))
843    with
844    strictness  = { \ arity -> StrictnessInfo [wwLazy] False }
845    out_of_line = True
846
847 ------------------------------------------------------------------------
848 --- MVars (not the same as mutable variables!)                       ---
849 ------------------------------------------------------------------------
850
851 primop  NewMVarOp "newMVar#"  GenPrimOp
852    State# s -> (# State# s, MVar# s a #)
853    with
854    usage       = { mangle NewMVarOp [mkP] mkR }
855    out_of_line = True
856
857 primop  TakeMVarOp "takeMVar#" GenPrimOp
858    MVar# s a -> State# s -> (# State# s, a #)
859    with
860    usage            = { mangle TakeMVarOp [mkM, mkP] mkM }
861    has_side_effects = True
862    out_of_line      = True
863
864 primop  PutMVarOp "putMVar#" GenPrimOp
865    MVar# s a -> a -> State# s -> State# s
866    with
867    strictness       = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
868    usage            = { mangle PutMVarOp [mkM, mkM, mkP] mkR }
869    has_side_effects = True
870    out_of_line      = True
871
872 primop  SameMVarOp "sameMVar#" GenPrimOp
873    MVar# s a -> MVar# s a -> Bool
874    with
875    usage = { mangle SameMVarOp [mkP, mkP] mkM }
876
877 primop  TryTakeMVarOp "tryTakeMVar#" GenPrimOp
878    MVar# s a -> State# s -> (# State# s, Int#, a #)
879    with
880    usage            = { mangle TryTakeMVarOp [mkM, mkP] mkM }
881    has_side_effects = True
882    out_of_line      = True
883
884 primop  IsEmptyMVarOp "isEmptyMVar#" GenPrimOp
885    MVar# s a -> State# s -> (# State# s, Int# #)
886    with
887    usage = { mangle IsEmptyMVarOp [mkP, mkP] mkM }
888
889
890 ------------------------------------------------------------------------
891 --- delay/wait operations                                            ---
892 ------------------------------------------------------------------------
893
894 primop  DelayOp "delay#" GenPrimOp
895    Int# -> State# s -> State# s
896    with
897    needs_wrapper    = True
898    has_side_effects = True
899    out_of_line      = True
900
901 primop  WaitReadOp "waitRead#" GenPrimOp
902    Int# -> State# s -> State# s
903    with
904    needs_wrapper    = True
905    has_side_effects = True
906    out_of_line      = True
907
908 primop  WaitWriteOp "waitWrite#" GenPrimOp
909    Int# -> State# s -> State# s
910    with
911    needs_wrapper    = True
912    has_side_effects = True
913    out_of_line      = True
914
915 ------------------------------------------------------------------------
916 --- concurrency primitives                                           ---
917 ------------------------------------------------------------------------
918
919 primop  ForkOp "fork#" GenPrimOp
920    a -> State# RealWorld -> (# State# RealWorld, ThreadId# #)
921    with
922    usage            = { mangle ForkOp [mkO, mkP] mkR }
923    strictness       = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
924    has_side_effects = True
925    out_of_line      = True
926
927 primop  KillThreadOp "killThread#"  GenPrimOp
928    ThreadId# -> a -> State# RealWorld -> State# RealWorld
929    with
930    usage            = { mangle KillThreadOp [mkP, mkM, mkP] mkR }
931    has_side_effects = True
932    out_of_line      = True
933
934 primop  YieldOp "yield#" GenPrimOp
935    State# RealWorld -> State# RealWorld
936    with
937    has_side_effects = True
938    out_of_line      = True
939
940 primop  MyThreadIdOp "myThreadId#" GenPrimOp
941     State# RealWorld -> (# State# RealWorld, ThreadId# #)
942
943 ------------------------------------------------------------------------
944 --- foreign objects                                                  ---
945 ------------------------------------------------------------------------
946
947 primop  MkForeignObjOp "mkForeignObj#" GenPrimOp
948    Addr# -> State# RealWorld -> (# State# RealWorld, ForeignObj# #)
949    with
950    has_side_effects = True
951    out_of_line      = True
952
953 primop  WriteForeignObjOp "writeForeignObj#" GenPrimOp
954    ForeignObj# -> Addr# -> State# s -> State# s
955    with
956    has_side_effects = True
957
958 primop ForeignObjToAddrOp "foreignObjToAddr#" GenPrimOp
959    ForeignObj# -> Addr#
960
961 primop TouchOp "touch#" GenPrimOp
962    o -> State# RealWorld -> State# RealWorld
963    with
964    strictness       = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
965
966 ------------------------------------------------------------------------
967 --- Bytecode objects                                                 ---
968 ------------------------------------------------------------------------
969
970 primop  NewBCOOp "newBCO#" GenPrimOp
971    Int# -> Int# -> Int# -> a -> State# RealWorld -> (# State# RealWorld, BCO# #)
972    with
973    has_side_effects = True
974    out_of_line    = True
975
976 primop  WriteBCOPtrOp "writeBCOPtr#" GenPrimOp
977    BCO# -> Int# -> o -> State# RealWorld -> State# RealWorld
978    with
979    usage            = { mangle WriteBCOPtrOp [mkP, mkP, mkM] mkR }
980    has_side_effects = True
981
982 primop  WriteBCONonPtrOp "writeBCONonPtr#" GenPrimOp
983    BCO# -> Int# -> Word# -> State# RealWorld -> State# RealWorld
984    with
985    has_side_effects = True
986
987 primop  WriteBCOInstrOp "writeBCOInstr#" GenPrimOp
988    BCO# -> Int# -> Word# -> State# RealWorld -> State# RealWorld
989    with
990    has_side_effects = True
991
992 primop  ReadBCOPtrOp "readBCOPtr#"  GenPrimOp
993    BCO# -> Int# -> State# RealWorld -> (# State# RealWorld, Word# #)
994    with
995    usage = { mangle ReadBCOPtrOp [mkP, mkP] mkM }
996
997 primop  ReadBCONonPtrOp "readBCONonPtr#"  GenPrimOp
998    BCO# -> Int# -> State# RealWorld -> (# State# RealWorld, Word# #)
999
1000 primop  ReadBCOInstrOp "readBCOInstr#" GenPrimOp
1001    BCO# -> Int# -> State# RealWorld -> (# State# RealWorld, Word# #)
1002
1003 ------------------------------------------------------------------------
1004 --- Weak pointers                                                    ---
1005 ------------------------------------------------------------------------
1006
1007 -- note that tyvar "o" denoted openAlphaTyVar
1008
1009 primop  MkWeakOp "mkWeak#" GenPrimOp
1010    o -> b -> c -> State# RealWorld -> (# State# RealWorld, Weak# b #)
1011    with
1012    strictness       = { \ arity -> StrictnessInfo [wwLazy, wwLazy, wwLazy, wwPrim] False }
1013    usage            = { mangle MkWeakOp [mkZ, mkM, mkM, mkP] mkM }
1014    has_side_effects = True
1015    out_of_line      = True
1016
1017 primop  DeRefWeakOp "deRefWeak#" GenPrimOp
1018    Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, a #)
1019    with
1020    usage            = { mangle DeRefWeakOp [mkM, mkP] mkM }
1021    has_side_effects = True
1022
1023 primop  FinalizeWeakOp "finalizeWeak#" GenPrimOp
1024    Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, 
1025               (State# RealWorld -> (# State# RealWorld, Unit #)) #)
1026    with
1027    usage            = { mangle FinalizeWeakOp [mkM, mkP] 
1028                                (mkR . (inUB FinalizeWeakOp 
1029                                             [id,id,inFun FinalizeWeakOp mkR mkM])) }
1030    has_side_effects = True
1031    out_of_line      = True
1032
1033
1034 ------------------------------------------------------------------------
1035 --- Stable pointers and names                                        ---
1036 ------------------------------------------------------------------------
1037
1038 primop  MakeStablePtrOp "makeStablePtr#" GenPrimOp
1039    a -> State# RealWorld -> (# State# RealWorld, StablePtr# a #)
1040    with
1041    strictness       = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1042    usage            = { mangle MakeStablePtrOp [mkM, mkP] mkM }
1043    has_side_effects = True
1044
1045 primop  DeRefStablePtrOp "deRefStablePtr#" GenPrimOp
1046    StablePtr# a -> State# RealWorld -> (# State# RealWorld, a #)
1047    with
1048    usage            = { mangle DeRefStablePtrOp [mkM, mkP] mkM }
1049    needs_wrapper    = True
1050    has_side_effects = True
1051
1052 primop  EqStablePtrOp "eqStablePtr#" GenPrimOp
1053    StablePtr# a -> StablePtr# a -> Int#
1054    with
1055    usage            = { mangle EqStablePtrOp [mkP, mkP] mkR }
1056    has_side_effects = True
1057
1058 primop  MakeStableNameOp "makeStableName#" GenPrimOp
1059    a -> State# RealWorld -> (# State# RealWorld, StableName# a #)
1060    with
1061    usage            = { mangle MakeStableNameOp [mkZ, mkP] mkR }
1062    strictness       = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1063    needs_wrapper    = True
1064    has_side_effects = True
1065    out_of_line      = True
1066
1067 primop  EqStableNameOp "eqStableName#" GenPrimOp
1068    StableName# a -> StableName# a -> Int#
1069    with
1070    usage = { mangle EqStableNameOp [mkP, mkP] mkR }
1071
1072 primop  StableNameToIntOp "stableNameToInt#" GenPrimOp
1073    StableName# a -> Int#
1074    with
1075    usage = { mangle StableNameToIntOp [mkP] mkR }
1076
1077 ------------------------------------------------------------------------
1078 --- Unsafe pointer equality (#1 Bad Guy: Alistair Reid :)            ---
1079 ------------------------------------------------------------------------
1080
1081 primop  ReallyUnsafePtrEqualityOp "reallyUnsafePtrEquality#" GenPrimOp
1082    a -> a -> Int#
1083    with
1084    usage = { mangle ReallyUnsafePtrEqualityOp [mkZ, mkZ] mkR }
1085
1086 ------------------------------------------------------------------------
1087 --- Parallelism                                                      ---
1088 ------------------------------------------------------------------------
1089
1090 primop  SeqOp "seq#" GenPrimOp
1091    a -> Int#
1092    with
1093    usage            = { mangle  SeqOp [mkO] mkR }
1094    strictness       = { \ arity -> StrictnessInfo [wwStrict] False }
1095       -- Seq is strict in its argument; see notes in ConFold.lhs
1096    has_side_effects = True
1097
1098 primop  ParOp "par#" GenPrimOp
1099    a -> Int#
1100    with
1101    usage            = { mangle ParOp [mkO] mkR }
1102    strictness       = { \ arity -> StrictnessInfo [wwLazy] False }
1103       -- Note that Par is lazy to avoid that the sparked thing
1104       -- gets evaluted strictly, which it should *not* be
1105    has_side_effects = True
1106
1107 -- HWL: The first 4 Int# in all par... annotations denote:
1108 --   name, granularity info, size of result, degree of parallelism
1109 --      Same  structure as _seq_ i.e. returns Int#
1110 -- KSW: v, the second arg in parAt# and parAtForNow#, is used only to determine
1111 --   `the processor containing the expression v'; it is not evaluated
1112
1113 primop  ParGlobalOp  "parGlobal#"  GenPrimOp
1114    a -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1115    with
1116    usage            = { mangle ParGlobalOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1117    has_side_effects = True
1118
1119 primop  ParLocalOp  "parLocal#"  GenPrimOp
1120    a -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1121    with
1122    usage            = { mangle ParLocalOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1123    has_side_effects = True
1124
1125 primop  ParAtOp  "parAt#"  GenPrimOp
1126    b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int#
1127    with
1128    usage            = { mangle ParAtOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM }
1129    has_side_effects = True
1130
1131 primop  ParAtAbsOp  "parAtAbs#"  GenPrimOp
1132    a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1133    with
1134    usage            = { mangle ParAtAbsOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1135    has_side_effects = True
1136
1137 primop  ParAtRelOp  "parAtRel#" GenPrimOp
1138    a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1139    with
1140    usage            = { mangle ParAtRelOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1141    has_side_effects = True
1142
1143 primop  ParAtForNowOp  "parAtForNow#" GenPrimOp
1144    b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int#
1145    with
1146    usage            = { mangle ParAtForNowOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM }
1147    has_side_effects = True
1148
1149 primop  CopyableOp  "copyable#" GenPrimOp
1150    a -> Int#
1151    with
1152    usage            = { mangle CopyableOp [mkZ] mkR }
1153    has_side_effects = True
1154
1155 primop  NoFollowOp "noFollow#" GenPrimOp
1156    a -> Int#
1157    with
1158    usage            = { mangle NoFollowOp [mkZ] mkR }
1159    has_side_effects = True
1160
1161
1162 ------------------------------------------------------------------------
1163 --- tag to enum stuff                                                ---
1164 ------------------------------------------------------------------------
1165
1166 primop  DataToTagOp "dataToTag#" GenPrimOp
1167    a -> Int#
1168    with
1169    strictness = { \ arity -> StrictnessInfo [wwLazy] False }
1170
1171 primop  TagToEnumOp "tagToEnum#" GenPrimOp     
1172    Int# -> a
1173
1174
1175 thats_all_folks
1176
1177 ------------------------------------------------------------------------
1178 ---                                                                  ---
1179 ------------------------------------------------------------------------
1180