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