1 -----------------------------------------------------------------------
2 -- $Id: primops.txt,v 1.17 2001/02/15 17:22:15 sewardj Exp $
4 -- Primitive Operations
6 -----------------------------------------------------------------------
8 -- To add a new primop, you currently need to update the following files:
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.)
15 -- - ghc/lib/std/PrelGHC.hi-boot, to declare the primop
17 -- - if the primop is inline (i.e. a macro), then:
18 -- ghc/includes/PrimOps.h
19 -- ghc/compiler/nativeGen/StixPrim.lhs
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)
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.
36 has_side_effects = False
41 strictness = { \ arity -> StrictnessInfo (replicate arity wwPrim) False }
42 usage = { nomangle other }
45 ------------------------------------------------------------------------
46 --- Support for the bytecode interpreter and linker ---
47 ------------------------------------------------------------------------
49 -- Convert an Addr# to a followable type
50 primop AddrToHValueOp "addrToHValue#" GenPrimOp
53 primop MkApUpd0_Op "mkApUpd0#" GenPrimOp
58 primop NewBCOOp "newBCO#" GenPrimOp
59 ByteArr# -> ByteArr# -> Array# a -> ByteArr# -> State# s -> (# State# s, BCO# #)
61 has_side_effects = True
65 ------------------------------------------------------------------------
67 ------------------------------------------------------------------------
69 primop AddrGtOp "gtAddr#" Compare Addr# -> Addr# -> Bool
70 primop AddrGeOp "geAddr#" Compare Addr# -> Addr# -> Bool
71 primop AddrEqOp "eqAddr#" Compare Addr# -> Addr# -> Bool
72 primop AddrNeOp "neAddr#" Compare Addr# -> Addr# -> Bool
73 primop AddrLtOp "ltAddr#" Compare Addr# -> Addr# -> Bool
74 primop AddrLeOp "leAddr#" Compare Addr# -> Addr# -> Bool
76 primop Addr2IntOp "addr2Int#" GenPrimOp Addr# -> Int#
79 ------------------------------------------------------------------------
81 ------------------------------------------------------------------------
83 primop CharGtOp "gtChar#" Compare Char# -> Char# -> Bool
84 primop CharGeOp "geChar#" Compare Char# -> Char# -> Bool
86 primop CharEqOp "eqChar#" Compare
87 Char# -> Char# -> Bool
88 with commutable = True
90 primop CharNeOp "neChar#" Compare
91 Char# -> Char# -> Bool
92 with commutable = True
94 primop CharLtOp "ltChar#" Compare Char# -> Char# -> Bool
95 primop CharLeOp "leChar#" Compare Char# -> Char# -> Bool
97 primop OrdOp "ord#" GenPrimOp Char# -> Int#
99 ------------------------------------------------------------------------
101 ------------------------------------------------------------------------
103 primop DoubleGtOp ">##" Compare Double# -> Double# -> Bool
104 primop DoubleGeOp ">=##" Compare Double# -> Double# -> Bool
106 primop DoubleEqOp "==##" Compare
107 Double# -> Double# -> Bool
108 with commutable = True
110 primop DoubleNeOp "/=##" Compare
111 Double# -> Double# -> Bool
112 with commutable = True
114 primop DoubleLtOp "<##" Compare Double# -> Double# -> Bool
115 primop DoubleLeOp "<=##" Compare Double# -> Double# -> Bool
117 primop DoubleAddOp "+##" Dyadic
118 Double# -> Double# -> Double#
119 with commutable = True
121 primop DoubleSubOp "-##" Dyadic Double# -> Double# -> Double#
123 primop DoubleMulOp "*##" Dyadic
124 Double# -> Double# -> Double#
125 with commutable = True
127 primop DoubleDivOp "/##" Dyadic
128 Double# -> Double# -> Double#
131 primop DoubleNegOp "negateDouble#" Monadic Double# -> Double#
133 primop Double2IntOp "double2Int#" GenPrimOp Double# -> Int#
134 primop Double2FloatOp "double2Float#" GenPrimOp Double# -> Float#
136 primop DoubleExpOp "expDouble#" Monadic
138 with needs_wrapper = True
140 primop DoubleLogOp "logDouble#" Monadic
146 primop DoubleSqrtOp "sqrtDouble#" Monadic
148 with needs_wrapper = True
150 primop DoubleSinOp "sinDouble#" Monadic
152 with needs_wrapper = True
154 primop DoubleCosOp "cosDouble#" Monadic
156 with needs_wrapper = True
158 primop DoubleTanOp "tanDouble#" Monadic
160 with needs_wrapper = True
162 primop DoubleAsinOp "asinDouble#" Monadic
168 primop DoubleAcosOp "acosDouble#" Monadic
174 primop DoubleAtanOp "atanDouble#" Monadic
179 primop DoubleSinhOp "sinhDouble#" Monadic
181 with needs_wrapper = True
183 primop DoubleCoshOp "coshDouble#" Monadic
185 with needs_wrapper = True
187 primop DoubleTanhOp "tanhDouble#" Monadic
189 with needs_wrapper = True
191 primop DoublePowerOp "**##" Dyadic
192 Double# -> Double# -> Double#
193 with needs_wrapper = True
195 primop DoubleDecodeOp "decodeDouble#" GenPrimOp
196 Double# -> (# Int#, Int#, ByteArr# #)
197 with out_of_line = True
199 ------------------------------------------------------------------------
201 ------------------------------------------------------------------------
203 primop FloatGtOp "gtFloat#" Compare Float# -> Float# -> Bool
204 primop FloatGeOp "geFloat#" Compare Float# -> Float# -> Bool
206 primop FloatEqOp "eqFloat#" Compare
207 Float# -> Float# -> Bool
208 with commutable = True
210 primop FloatNeOp "neFloat#" Compare
211 Float# -> Float# -> Bool
212 with commutable = True
214 primop FloatLtOp "ltFloat#" Compare Float# -> Float# -> Bool
215 primop FloatLeOp "leFloat#" Compare Float# -> Float# -> Bool
217 primop FloatAddOp "plusFloat#" Dyadic
218 Float# -> Float# -> Float#
219 with commutable = True
221 primop FloatSubOp "minusFloat#" Dyadic Float# -> Float# -> Float#
223 primop FloatMulOp "timesFloat#" Dyadic
224 Float# -> Float# -> Float#
225 with commutable = True
227 primop FloatDivOp "divideFloat#" Dyadic
228 Float# -> Float# -> Float#
231 primop FloatNegOp "negateFloat#" Monadic Float# -> Float#
233 primop Float2IntOp "float2Int#" GenPrimOp Float# -> Int#
235 primop FloatExpOp "expFloat#" Monadic
237 with needs_wrapper = True
239 primop FloatLogOp "logFloat#" Monadic
241 with needs_wrapper = True
244 primop FloatSqrtOp "sqrtFloat#" Monadic
246 with needs_wrapper = True
248 primop FloatSinOp "sinFloat#" Monadic
250 with needs_wrapper = True
252 primop FloatCosOp "cosFloat#" Monadic
254 with needs_wrapper = True
256 primop FloatTanOp "tanFloat#" Monadic
258 with needs_wrapper = True
260 primop FloatAsinOp "asinFloat#" Monadic
262 with needs_wrapper = True
265 primop FloatAcosOp "acosFloat#" Monadic
267 with needs_wrapper = True
270 primop FloatAtanOp "atanFloat#" Monadic
272 with needs_wrapper = True
274 primop FloatSinhOp "sinhFloat#" Monadic
276 with needs_wrapper = True
278 primop FloatCoshOp "coshFloat#" Monadic
280 with needs_wrapper = True
282 primop FloatTanhOp "tanhFloat#" Monadic
284 with needs_wrapper = True
286 primop FloatPowerOp "powerFloat#" Dyadic
287 Float# -> Float# -> Float#
288 with needs_wrapper = True
290 primop Float2DoubleOp "float2Double#" GenPrimOp Float# -> Double#
292 primop FloatDecodeOp "decodeFloat#" GenPrimOp
293 Float# -> (# Int#, Int#, ByteArr# #)
294 with out_of_line = True
296 ------------------------------------------------------------------------
298 ------------------------------------------------------------------------
300 primop IntAddOp "+#" Dyadic
302 with commutable = True
304 primop IntSubOp "-#" Dyadic Int# -> Int# -> Int#
307 Dyadic Int# -> Int# -> Int#
308 with commutable = True
310 primop IntQuotOp "quotInt#" Dyadic
314 primop IntRemOp "remInt#" Dyadic
318 primop IntGcdOp "gcdInt#" Dyadic Int# -> Int# -> Int#
319 primop IntNegOp "negateInt#" Monadic Int# -> Int#
320 primop IntAddCOp "addIntC#" GenPrimOp Int# -> Int# -> (# Int#, Int# #)
321 primop IntSubCOp "subIntC#" GenPrimOp Int# -> Int# -> (# Int#, Int# #)
322 primop IntMulCOp "mulIntC#" GenPrimOp Int# -> Int# -> (# Int#, Int# #)
323 primop IntGtOp ">#" Compare Int# -> Int# -> Bool
324 primop IntGeOp ">=#" Compare Int# -> Int# -> Bool
326 primop IntEqOp "==#" Compare
328 with commutable = True
330 primop IntNeOp "/=#" Compare
332 with commutable = True
334 primop IntLtOp "<#" Compare Int# -> Int# -> Bool
335 primop IntLeOp "<=#" Compare Int# -> Int# -> Bool
337 primop ChrOp "chr#" GenPrimOp Int# -> Char#
339 primop Int2WordOp "int2Word#" GenPrimOp Int# -> Word#
340 primop Int2AddrOp "int2Addr#"GenPrimOp Int# -> Addr#
341 primop Int2FloatOp "int2Float#" GenPrimOp Int# -> Float#
342 primop Int2DoubleOp "int2Double#" GenPrimOp Int# -> Double#
344 primop Int2IntegerOp "int2Integer#"
345 GenPrimOp Int# -> (# Int#, ByteArr# #)
346 with out_of_line = True
348 primop ISllOp "iShiftL#" GenPrimOp Int# -> Int# -> Int#
349 primop ISraOp "iShiftRA#" GenPrimOp Int# -> Int# -> Int#
350 primop ISrlOp "iShiftRL#" GenPrimOp Int# -> Int# -> Int#
352 ------------------------------------------------------------------------
354 ------------------------------------------------------------------------
356 primop Int64ToIntegerOp "int64ToInteger#" GenPrimOp
357 Int64# -> (# Int#, ByteArr# #)
358 with out_of_line = True
361 ------------------------------------------------------------------------
363 ------------------------------------------------------------------------
365 primop IntegerAddOp "plusInteger#" GenPrimOp
366 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
367 with commutable = True
370 primop IntegerSubOp "minusInteger#" GenPrimOp
371 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
372 with out_of_line = True
374 primop IntegerMulOp "timesInteger#" GenPrimOp
375 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
376 with commutable = True
379 primop IntegerGcdOp "gcdInteger#" GenPrimOp
380 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
381 with commutable = True
384 primop IntegerIntGcdOp "gcdIntegerInt#" GenPrimOp
385 Int# -> ByteArr# -> Int# -> Int#
386 with commutable = True
388 primop IntegerDivExactOp "divExactInteger#" GenPrimOp
389 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
390 with out_of_line = True
392 primop IntegerQuotOp "quotInteger#" GenPrimOp
393 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
394 with out_of_line = True
396 primop IntegerRemOp "remInteger#" GenPrimOp
397 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
398 with out_of_line = True
400 primop IntegerCmpOp "cmpInteger#" GenPrimOp
401 Int# -> ByteArr# -> Int# -> ByteArr# -> Int#
402 with needs_wrapper = True
404 primop IntegerCmpIntOp "cmpIntegerInt#" GenPrimOp
405 Int# -> ByteArr# -> Int# -> Int#
406 with needs_wrapper = True
408 primop IntegerQuotRemOp "quotRemInteger#" GenPrimOp
409 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr#, Int#, ByteArr# #)
413 primop IntegerDivModOp "divModInteger#" GenPrimOp
414 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr#, Int#, ByteArr# #)
418 primop Integer2IntOp "integer2Int#" GenPrimOp
419 Int# -> ByteArr# -> Int#
420 with needs_wrapper = True
422 primop Integer2WordOp "integer2Word#" GenPrimOp
423 Int# -> ByteArr# -> Word#
424 with needs_wrapper = True
426 primop IntegerToInt64Op "integerToInt64#" GenPrimOp
427 Int# -> ByteArr# -> Int64#
429 primop IntegerToWord64Op "integerToWord64#" GenPrimOp
430 Int# -> ByteArr# -> Word64#
432 primop IntegerAndOp "andInteger#" GenPrimOp
433 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
434 with out_of_line = True
436 primop IntegerOrOp "orInteger#" GenPrimOp
437 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
438 with out_of_line = True
440 primop IntegerXorOp "xorInteger#" GenPrimOp
441 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
442 with out_of_line = True
444 primop IntegerComplementOp "complementInteger#" GenPrimOp
445 Int# -> ByteArr# -> (# Int#, ByteArr# #)
446 with out_of_line = True
448 ------------------------------------------------------------------------
450 ------------------------------------------------------------------------
452 primop WordQuotOp "quotWord#" Dyadic Word# -> Word# -> Word#
453 primop WordRemOp "remWord#" Dyadic Word# -> Word# -> Word#
455 primop AndOp "and#" Dyadic
456 Word# -> Word# -> Word#
457 with commutable = True
459 primop OrOp "or#" Dyadic
460 Word# -> Word# -> Word#
461 with commutable = True
463 primop XorOp "xor#" Dyadic
464 Word# -> Word# -> Word#
465 with commutable = True
467 primop NotOp "not#" Monadic Word# -> Word#
469 primop SllOp "shiftL#" GenPrimOp Word# -> Int# -> Word#
470 primop SrlOp "shiftRL#" GenPrimOp Word# -> Int# -> Word#
473 primop Word2IntOp "word2Int#" GenPrimOp Word# -> Int#
475 primop Word2IntegerOp "word2Integer#" GenPrimOp
476 Word# -> (# Int#, ByteArr# #)
477 with out_of_line = True
479 primop WordGtOp "gtWord#" Compare Word# -> Word# -> Bool
480 primop WordGeOp "geWord#" Compare Word# -> Word# -> Bool
481 primop WordEqOp "eqWord#" Compare Word# -> Word# -> Bool
482 primop WordNeOp "neWord#" Compare Word# -> Word# -> Bool
483 primop WordLtOp "ltWord#" Compare Word# -> Word# -> Bool
484 primop WordLeOp "leWord#" Compare Word# -> Word# -> Bool
486 ------------------------------------------------------------------------
488 ------------------------------------------------------------------------
490 primop Word64ToIntegerOp "word64ToInteger#" GenPrimOp
491 Word64# -> (# Int#, ByteArr# #)
492 with out_of_line = True
495 ------------------------------------------------------------------------
497 ------------------------------------------------------------------------
499 primop NewByteArrayOp_Char "newByteArray#" GenPrimOp
500 Int# -> State# s -> (# State# s, MutByteArr# s #)
501 with out_of_line = True
504 primop ReadByteArrayOp_Char "readCharArray#" GenPrimOp
505 MutByteArr# s -> Int# -> State# s -> (# State# s, Char# #)
507 primop ReadByteArrayOp_Int "readIntArray#" GenPrimOp
508 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
510 primop ReadByteArrayOp_Word "readWordArray#" GenPrimOp
511 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
513 primop ReadByteArrayOp_Addr "readAddrArray#" GenPrimOp
514 MutByteArr# s -> Int# -> State# s -> (# State# s, Addr# #)
516 primop ReadByteArrayOp_Float "readFloatArray#" GenPrimOp
517 MutByteArr# s -> Int# -> State# s -> (# State# s, Float# #)
519 primop ReadByteArrayOp_Double "readDoubleArray#" GenPrimOp
520 MutByteArr# s -> Int# -> State# s -> (# State# s, Double# #)
522 primop ReadByteArrayOp_StablePtr "readStablePtrArray#" GenPrimOp
523 MutByteArr# s -> Int# -> State# s -> (# State# s, StablePtr# a #)
525 primop ReadByteArrayOp_Int8 "readInt8Array#" GenPrimOp
526 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
528 primop ReadByteArrayOp_Int16 "readInt16Array#" GenPrimOp
529 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
531 primop ReadByteArrayOp_Int32 "readInt32Array#" GenPrimOp
532 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
534 primop ReadByteArrayOp_Int64 "readInt64Array#" GenPrimOp
535 MutByteArr# s -> Int# -> State# s -> (# State# s, Int64# #)
537 primop ReadByteArrayOp_Word8 "readWord8Array#" GenPrimOp
538 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
540 primop ReadByteArrayOp_Word16 "readWord16Array#" GenPrimOp
541 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
543 primop ReadByteArrayOp_Word32 "readWord32Array#" GenPrimOp
544 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
546 primop ReadByteArrayOp_Word64 "readWord64Array#" GenPrimOp
547 MutByteArr# s -> Int# -> State# s -> (# State# s, Word64# #)
551 primop WriteByteArrayOp_Char "writeCharArray#" GenPrimOp
552 MutByteArr# s -> Int# -> Char# -> State# s -> State# s
553 with has_side_effects = True
555 primop WriteByteArrayOp_Int "writeIntArray#" GenPrimOp
556 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
557 with has_side_effects = True
559 primop WriteByteArrayOp_Word "writeWordArray#" GenPrimOp
560 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
561 with has_side_effects = True
563 primop WriteByteArrayOp_Addr "writeAddrArray#" GenPrimOp
564 MutByteArr# s -> Int# -> Addr# -> State# s -> State# s
565 with has_side_effects = True
567 primop WriteByteArrayOp_Float "writeFloatArray#" GenPrimOp
568 MutByteArr# s -> Int# -> Float# -> State# s -> State# s
569 with has_side_effects = True
571 primop WriteByteArrayOp_Double "writeDoubleArray#" GenPrimOp
572 MutByteArr# s -> Int# -> Double# -> State# s -> State# s
573 with has_side_effects = True
575 primop WriteByteArrayOp_StablePtr "writeStablePtrArray#" GenPrimOp
576 MutByteArr# s -> Int# -> StablePtr# a -> State# s -> State# s
577 with has_side_effects = True
579 primop WriteByteArrayOp_Int8 "writeInt8Array#" GenPrimOp
580 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
581 with has_side_effects = True
583 primop WriteByteArrayOp_Word8 "writeWord8Array#" GenPrimOp
584 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
585 with has_side_effects = True
587 primop WriteByteArrayOp_Int16 "writeInt16Array#" GenPrimOp
588 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
589 with has_side_effects = True
591 primop WriteByteArrayOp_Word16 "writeWord16Array#" GenPrimOp
592 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
593 with has_side_effects = True
595 primop WriteByteArrayOp_Int32 "writeInt32Array#" GenPrimOp
596 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
597 with has_side_effects = True
599 primop WriteByteArrayOp_Word32 "writeWord32Array#" GenPrimOp
600 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
601 with has_side_effects = True
603 primop WriteByteArrayOp_Int64 "writeInt64Array#" GenPrimOp
604 MutByteArr# s -> Int# -> Int64# -> State# s -> State# s
605 with has_side_effects = True
607 primop WriteByteArrayOp_Word64 "writeWord64Array#" GenPrimOp
608 MutByteArr# s -> Int# -> Word64# -> State# s -> State# s
609 with has_side_effects = True
612 primop IndexByteArrayOp_Char "indexCharArray#" GenPrimOp
613 ByteArr# -> Int# -> Char#
615 primop IndexByteArrayOp_Int "indexIntArray#" GenPrimOp
616 ByteArr# -> Int# -> Int#
618 primop IndexByteArrayOp_Word "indexWordArray#" GenPrimOp
619 ByteArr# -> Int# -> Word#
621 primop IndexByteArrayOp_Addr "indexAddrArray#" GenPrimOp
622 ByteArr# -> Int# -> Addr#
624 primop IndexByteArrayOp_Float "indexFloatArray#" GenPrimOp
625 ByteArr# -> Int# -> Float#
627 primop IndexByteArrayOp_Double "indexDoubleArray#" GenPrimOp
628 ByteArr# -> Int# -> Double#
630 primop IndexByteArrayOp_StablePtr "indexStablePtrArray#" GenPrimOp
631 ByteArr# -> Int# -> StablePtr# a
633 primop IndexByteArrayOp_Int8 "indexInt8Array#" GenPrimOp
634 ByteArr# -> Int# -> Int#
636 primop IndexByteArrayOp_Word8 "indexWord8Array#" GenPrimOp
637 ByteArr# -> Int# -> Word#
639 primop IndexByteArrayOp_Int16 "indexInt16Array#" GenPrimOp
640 ByteArr# -> Int# -> Int#
642 primop IndexByteArrayOp_Word16 "indexWord16Array#" GenPrimOp
643 ByteArr# -> Int# -> Word#
645 primop IndexByteArrayOp_Int32 "indexInt32Array#" GenPrimOp
646 ByteArr# -> Int# -> Int#
648 primop IndexByteArrayOp_Word32 "indexWord32Array#" GenPrimOp
649 ByteArr# -> Int# -> Word#
651 primop IndexByteArrayOp_Int64 "indexInt64Array#" GenPrimOp
652 ByteArr# -> Int# -> Int64#
654 primop IndexByteArrayOp_Word64 "indexWord64Array#" GenPrimOp
655 ByteArr# -> Int# -> Word64#
658 primop IndexOffAddrOp_Char "indexCharOffAddr#" GenPrimOp
659 Addr# -> Int# -> Char#
661 primop IndexOffAddrOp_Int "indexIntOffAddr#" GenPrimOp
662 Addr# -> Int# -> Int#
664 primop IndexOffAddrOp_Word "indexWordOffAddr#" GenPrimOp
665 Addr# -> Int# -> Word#
667 primop IndexOffAddrOp_Addr "indexAddrOffAddr#" GenPrimOp
668 Addr# -> Int# -> Addr#
670 primop IndexOffAddrOp_Float "indexFloatOffAddr#" GenPrimOp
671 Addr# -> Int# -> Float#
673 primop IndexOffAddrOp_Double "indexDoubleOffAddr#" GenPrimOp
674 Addr# -> Int# -> Double#
676 primop IndexOffAddrOp_StablePtr "indexStablePtrOffAddr#" GenPrimOp
677 Addr# -> Int# -> StablePtr# a
679 primop IndexOffAddrOp_Int8 "indexInt8OffAddr#" GenPrimOp
680 Addr# -> Int# -> Int#
682 primop IndexOffAddrOp_Word8 "indexWord8OffAddr#" GenPrimOp
683 Addr# -> Int# -> Word#
685 primop IndexOffAddrOp_Int16 "indexInt16OffAddr#" GenPrimOp
686 Addr# -> Int# -> Int#
688 primop IndexOffAddrOp_Word16 "indexWord16OffAddr#" GenPrimOp
689 Addr# -> Int# -> Word#
691 primop IndexOffAddrOp_Int32 "indexInt32OffAddr#" GenPrimOp
692 Addr# -> Int# -> Int#
694 primop IndexOffAddrOp_Word32 "indexWord32OffAddr#" GenPrimOp
695 Addr# -> Int# -> Word#
697 primop IndexOffAddrOp_Int64 "indexInt64OffAddr#" GenPrimOp
698 Addr# -> Int# -> Int64#
700 primop IndexOffAddrOp_Word64 "indexWord64OffAddr#" GenPrimOp
701 Addr# -> Int# -> Word64#
704 primop IndexOffForeignObjOp_Char "indexCharOffForeignObj#" GenPrimOp
705 ForeignObj# -> Int# -> Char#
707 primop IndexOffForeignObjOp_Int "indexIntOffForeignObj#" GenPrimOp
708 ForeignObj# -> Int# -> Int#
710 primop IndexOffForeignObjOp_Word "indexWordOffForeignObj#" GenPrimOp
711 ForeignObj# -> Int# -> Word#
713 primop IndexOffForeignObjOp_Addr "indexAddrOffForeignObj#" GenPrimOp
714 ForeignObj# -> Int# -> Addr#
716 primop IndexOffForeignObjOp_Float "indexFloatOffForeignObj#" GenPrimOp
717 ForeignObj# -> Int# -> Float#
719 primop IndexOffForeignObjOp_Double "indexDoubleOffForeignObj#" GenPrimOp
720 ForeignObj# -> Int# -> Double#
722 primop IndexOffForeignObjOp_StablePtr "indexStablePtrOffForeignObj#" GenPrimOp
723 ForeignObj# -> Int# -> StablePtr# a
725 primop IndexOffForeignObjOp_Int8 "indexInt8OffForeignObj#" GenPrimOp
726 ForeignObj# -> Int# -> Int#
728 primop IndexOffForeignObjOp_Word8 "indexWord8OffForeignObj#" GenPrimOp
729 ForeignObj# -> Int# -> Word#
731 primop IndexOffForeignObjOp_Int16 "indexInt16OffForeignObj#" GenPrimOp
732 ForeignObj# -> Int# -> Int#
734 primop IndexOffForeignObjOp_Word16 "indexWord16OffForeignObj#" GenPrimOp
735 ForeignObj# -> Int# -> Word#
737 primop IndexOffForeignObjOp_Int32 "indexInt32OffForeignObj#" GenPrimOp
738 ForeignObj# -> Int# -> Int#
740 primop IndexOffForeignObjOp_Word32 "indexWord32OffForeignObj#" GenPrimOp
741 ForeignObj# -> Int# -> Word#
743 primop IndexOffForeignObjOp_Int64 "indexInt64OffForeignObj#" GenPrimOp
744 ForeignObj# -> Int# -> Int64#
746 primop IndexOffForeignObjOp_Word64 "indexWord64OffForeignObj#" GenPrimOp
747 ForeignObj# -> Int# -> Word64#
751 primop ReadOffAddrOp_Char "readCharOffAddr#" GenPrimOp
752 Addr# -> Int# -> State# s -> (# State# s, Char# #)
754 primop ReadOffAddrOp_Int "readIntOffAddr#" GenPrimOp
755 Addr# -> Int# -> State# s -> (# State# s, Int# #)
757 primop ReadOffAddrOp_Word "readWordOffAddr#" GenPrimOp
758 Addr# -> Int# -> State# s -> (# State# s, Word# #)
760 primop ReadOffAddrOp_Addr "readAddrOffAddr#" GenPrimOp
761 Addr# -> Int# -> State# s -> (# State# s, Addr# #)
763 primop ReadOffAddrOp_Float "readFloatOffAddr#" GenPrimOp
764 Addr# -> Int# -> State# s -> (# State# s, Float# #)
766 primop ReadOffAddrOp_Double "readDoubleOffAddr#" GenPrimOp
767 Addr# -> Int# -> State# s -> (# State# s, Double# #)
769 primop ReadOffAddrOp_StablePtr "readStablePtrOffAddr#" GenPrimOp
770 Addr# -> Int# -> State# s -> (# State# s, StablePtr# a #)
772 primop ReadOffAddrOp_Int8 "readInt8OffAddr#" GenPrimOp
773 Addr# -> Int# -> State# s -> (# State# s, Int# #)
775 primop ReadOffAddrOp_Word8 "readWord8OffAddr#" GenPrimOp
776 Addr# -> Int# -> State# s -> (# State# s, Word# #)
778 primop ReadOffAddrOp_Int16 "readInt16OffAddr#" GenPrimOp
779 Addr# -> Int# -> State# s -> (# State# s, Int# #)
781 primop ReadOffAddrOp_Word16 "readWord16OffAddr#" GenPrimOp
782 Addr# -> Int# -> State# s -> (# State# s, Word# #)
784 primop ReadOffAddrOp_Int32 "readInt32OffAddr#" GenPrimOp
785 Addr# -> Int# -> State# s -> (# State# s, Int# #)
787 primop ReadOffAddrOp_Word32 "readWord32OffAddr#" GenPrimOp
788 Addr# -> Int# -> State# s -> (# State# s, Word# #)
790 primop ReadOffAddrOp_Int64 "readInt64OffAddr#" GenPrimOp
791 Addr# -> Int# -> State# s -> (# State# s, Int64# #)
793 primop ReadOffAddrOp_Word64 "readWord64OffAddr#" GenPrimOp
794 Addr# -> Int# -> State# s -> (# State# s, Word64# #)
797 primop WriteOffAddrOp_Char "writeCharOffAddr#" GenPrimOp
798 Addr# -> Int# -> Char# -> State# s -> State# s
799 with has_side_effects = True
801 primop WriteOffAddrOp_Int "writeIntOffAddr#" GenPrimOp
802 Addr# -> Int# -> Int# -> State# s -> State# s
803 with has_side_effects = True
805 primop WriteOffAddrOp_Word "writeWordOffAddr#" GenPrimOp
806 Addr# -> Int# -> Word# -> State# s -> State# s
807 with has_side_effects = True
809 primop WriteOffAddrOp_Addr "writeAddrOffAddr#" GenPrimOp
810 Addr# -> Int# -> Addr# -> State# s -> State# s
811 with has_side_effects = True
813 primop WriteOffAddrOp_Float "writeFloatOffAddr#" GenPrimOp
814 Addr# -> Int# -> Float# -> State# s -> State# s
815 with has_side_effects = True
817 primop WriteOffAddrOp_Double "writeDoubleOffAddr#" GenPrimOp
818 Addr# -> Int# -> Double# -> State# s -> State# s
819 with has_side_effects = True
821 primop WriteOffAddrOp_StablePtr "writeStablePtrOffAddr#" GenPrimOp
822 Addr# -> Int# -> StablePtr# a -> State# s -> State# s
823 with has_side_effects = True
825 primop WriteOffAddrOp_ForeignObj "writeForeignObjOffAddr#" GenPrimOp
826 Addr# -> Int# -> ForeignObj# -> State# s -> State# s
827 with has_side_effects = True
829 primop WriteOffAddrOp_Int8 "writeInt8OffAddr#" GenPrimOp
830 Addr# -> Int# -> Int# -> State# s -> State# s
831 with has_side_effects = True
833 primop WriteOffAddrOp_Word8 "writeWord8OffAddr#" GenPrimOp
834 Addr# -> Int# -> Word# -> State# s -> State# s
835 with has_side_effects = True
837 primop WriteOffAddrOp_Int16 "writeInt16OffAddr#" GenPrimOp
838 Addr# -> Int# -> Int# -> State# s -> State# s
839 with has_side_effects = True
841 primop WriteOffAddrOp_Word16 "writeWord16OffAddr#" GenPrimOp
842 Addr# -> Int# -> Word# -> State# s -> State# s
843 with has_side_effects = True
845 primop WriteOffAddrOp_Int32 "writeInt32OffAddr#" GenPrimOp
846 Addr# -> Int# -> Int# -> State# s -> State# s
847 with has_side_effects = True
849 primop WriteOffAddrOp_Word32 "writeWord32OffAddr#" GenPrimOp
850 Addr# -> Int# -> Word# -> State# s -> State# s
851 with has_side_effects = True
853 primop WriteOffAddrOp_Int64 "writeInt64OffAddr#" GenPrimOp
854 Addr# -> Int# -> Int64# -> State# s -> State# s
855 with has_side_effects = True
857 primop WriteOffAddrOp_Word64 "writeWord64OffAddr#" GenPrimOp
858 Addr# -> Int# -> Word64# -> State# s -> State# s
859 with has_side_effects = True
863 primop NewArrayOp "newArray#" GenPrimOp
864 Int# -> a -> State# s -> (# State# s, MutArr# s a #)
866 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
867 usage = { mangle NewArrayOp [mkP, mkM, mkP] mkM }
870 primop SameMutableArrayOp "sameMutableArray#" GenPrimOp
871 MutArr# s a -> MutArr# s a -> Bool
873 usage = { mangle SameMutableArrayOp [mkP, mkP] mkM }
875 primop SameMutableByteArrayOp "sameMutableByteArray#" GenPrimOp
876 MutByteArr# s -> MutByteArr# s -> Bool
878 primop ReadArrayOp "readArray#" GenPrimOp
879 MutArr# s a -> Int# -> State# s -> (# State# s, a #)
881 usage = { mangle ReadArrayOp [mkM, mkP, mkP] mkM }
883 primop WriteArrayOp "writeArray#" GenPrimOp
884 MutArr# s a -> Int# -> a -> State# s -> State# s
886 usage = { mangle WriteArrayOp [mkM, mkP, mkM, mkP] mkR }
887 strictness = { \ arity -> StrictnessInfo [wwPrim, wwPrim, wwLazy, wwPrim] False }
888 has_side_effects = True
890 primop IndexArrayOp "indexArray#" GenPrimOp
891 Array# a -> Int# -> (# a #)
893 usage = { mangle IndexArrayOp [mkM, mkP] mkM }
895 primop UnsafeFreezeArrayOp "unsafeFreezeArray#" GenPrimOp
896 MutArr# s a -> State# s -> (# State# s, Array# a #)
898 usage = { mangle UnsafeFreezeArrayOp [mkM, mkP] mkM }
899 has_side_effects = True
901 primop UnsafeFreezeByteArrayOp "unsafeFreezeByteArray#" GenPrimOp
902 MutByteArr# s -> State# s -> (# State# s, ByteArr# #)
904 has_side_effects = True
906 primop UnsafeThawArrayOp "unsafeThawArray#" GenPrimOp
907 Array# a -> State# s -> (# State# s, MutArr# s a #)
909 usage = { mangle UnsafeThawArrayOp [mkM, mkP] mkM }
912 primop SizeofByteArrayOp "sizeofByteArray#" GenPrimOp
915 primop SizeofMutableByteArrayOp "sizeofMutableByteArray#" GenPrimOp
916 MutByteArr# s -> Int#
918 ------------------------------------------------------------------------
919 --- Mutable variables ---
920 ------------------------------------------------------------------------
922 primop NewMutVarOp "newMutVar#" GenPrimOp
923 a -> State# s -> (# State# s, MutVar# s a #)
925 usage = { mangle NewMutVarOp [mkM, mkP] mkM }
926 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
929 primop ReadMutVarOp "readMutVar#" GenPrimOp
930 MutVar# s a -> State# s -> (# State# s, a #)
932 usage = { mangle ReadMutVarOp [mkM, mkP] mkM }
934 primop WriteMutVarOp "writeMutVar#" GenPrimOp
935 MutVar# s a -> a -> State# s -> State# s
937 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
938 usage = { mangle WriteMutVarOp [mkM, mkM, mkP] mkR }
939 has_side_effects = True
941 primop SameMutVarOp "sameMutVar#" GenPrimOp
942 MutVar# s a -> MutVar# s a -> Bool
944 usage = { mangle SameMutVarOp [mkP, mkP] mkM }
946 ------------------------------------------------------------------------
948 ------------------------------------------------------------------------
950 primop CatchOp "catch#" GenPrimOp
951 (State# RealWorld -> (# State# RealWorld, a #) )
952 -> (b -> State# RealWorld -> (# State# RealWorld, a #) )
954 -> (# State# RealWorld, a #)
956 strictness = { \ arity -> StrictnessInfo [wwLazy, wwLazy, wwPrim] False }
957 -- Catch is actually strict in its first argument
958 -- but we don't want to tell the strictness
959 -- analyser about that!
960 usage = { mangle CatchOp [mkM, mkM . (inFun CatchOp mkM mkM), mkP] mkM }
961 -- [mkO, mkO . (inFun mkM mkO)] mkO
962 -- might use caught action multiply
965 primop RaiseOp "raise#" GenPrimOp
968 strictness = { \ arity -> StrictnessInfo [wwLazy] True }
969 -- NB: True => result is bottom
970 usage = { mangle RaiseOp [mkM] mkM }
973 primop BlockAsyncExceptionsOp "blockAsyncExceptions#" GenPrimOp
974 (State# RealWorld -> (# State# RealWorld, a #))
975 -> (State# RealWorld -> (# State# RealWorld, a #))
977 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
980 primop UnblockAsyncExceptionsOp "unblockAsyncExceptions#" GenPrimOp
981 (State# RealWorld -> (# State# RealWorld, a #))
982 -> (State# RealWorld -> (# State# RealWorld, a #))
984 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
987 ------------------------------------------------------------------------
988 --- MVars (not the same as mutable variables!) ---
989 ------------------------------------------------------------------------
991 primop NewMVarOp "newMVar#" GenPrimOp
992 State# s -> (# State# s, MVar# s a #)
994 usage = { mangle NewMVarOp [mkP] mkR }
997 primop TakeMVarOp "takeMVar#" GenPrimOp
998 MVar# s a -> State# s -> (# State# s, a #)
1000 usage = { mangle TakeMVarOp [mkM, mkP] mkM }
1001 has_side_effects = True
1004 primop TryTakeMVarOp "tryTakeMVar#" GenPrimOp
1005 MVar# s a -> State# s -> (# State# s, Int#, a #)
1007 usage = { mangle TryTakeMVarOp [mkM, mkP] mkM }
1008 has_side_effects = True
1011 primop PutMVarOp "putMVar#" GenPrimOp
1012 MVar# s a -> a -> State# s -> State# s
1014 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
1015 usage = { mangle PutMVarOp [mkM, mkM, mkP] mkR }
1016 has_side_effects = True
1019 primop TryPutMVarOp "tryPutMVar#" GenPrimOp
1020 MVar# s a -> a -> State# s -> (# State# s, Int# #)
1022 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
1023 usage = { mangle TryPutMVarOp [mkM, mkM, mkP] mkR }
1024 has_side_effects = True
1027 primop SameMVarOp "sameMVar#" GenPrimOp
1028 MVar# s a -> MVar# s a -> Bool
1030 usage = { mangle SameMVarOp [mkP, mkP] mkM }
1032 primop IsEmptyMVarOp "isEmptyMVar#" GenPrimOp
1033 MVar# s a -> State# s -> (# State# s, Int# #)
1035 usage = { mangle IsEmptyMVarOp [mkP, mkP] mkM }
1038 ------------------------------------------------------------------------
1039 --- delay/wait operations ---
1040 ------------------------------------------------------------------------
1042 primop DelayOp "delay#" GenPrimOp
1043 Int# -> State# s -> State# s
1045 needs_wrapper = True
1046 has_side_effects = True
1049 primop WaitReadOp "waitRead#" GenPrimOp
1050 Int# -> State# s -> State# s
1052 needs_wrapper = True
1053 has_side_effects = True
1056 primop WaitWriteOp "waitWrite#" GenPrimOp
1057 Int# -> State# s -> State# s
1059 needs_wrapper = True
1060 has_side_effects = True
1063 ------------------------------------------------------------------------
1064 --- concurrency primitives ---
1065 ------------------------------------------------------------------------
1067 primop ForkOp "fork#" GenPrimOp
1068 a -> State# RealWorld -> (# State# RealWorld, ThreadId# #)
1070 usage = { mangle ForkOp [mkO, mkP] mkR }
1071 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1072 has_side_effects = True
1075 primop KillThreadOp "killThread#" GenPrimOp
1076 ThreadId# -> a -> State# RealWorld -> State# RealWorld
1078 usage = { mangle KillThreadOp [mkP, mkM, mkP] mkR }
1079 has_side_effects = True
1082 primop YieldOp "yield#" GenPrimOp
1083 State# RealWorld -> State# RealWorld
1085 has_side_effects = True
1088 primop MyThreadIdOp "myThreadId#" GenPrimOp
1089 State# RealWorld -> (# State# RealWorld, ThreadId# #)
1091 ------------------------------------------------------------------------
1092 --- foreign objects ---
1093 ------------------------------------------------------------------------
1095 primop MkForeignObjOp "mkForeignObj#" GenPrimOp
1096 Addr# -> State# RealWorld -> (# State# RealWorld, ForeignObj# #)
1098 has_side_effects = True
1101 primop WriteForeignObjOp "writeForeignObj#" GenPrimOp
1102 ForeignObj# -> Addr# -> State# s -> State# s
1104 has_side_effects = True
1106 primop ForeignObjToAddrOp "foreignObjToAddr#" GenPrimOp
1107 ForeignObj# -> Addr#
1109 primop TouchOp "touch#" GenPrimOp
1110 o -> State# RealWorld -> State# RealWorld
1112 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1115 ------------------------------------------------------------------------
1116 --- Weak pointers ---
1117 ------------------------------------------------------------------------
1119 -- note that tyvar "o" denotes openAlphaTyVar
1121 primop MkWeakOp "mkWeak#" GenPrimOp
1122 o -> b -> c -> State# RealWorld -> (# State# RealWorld, Weak# b #)
1124 strictness = { \ arity -> StrictnessInfo [wwLazy, wwLazy, wwLazy, wwPrim] False }
1125 usage = { mangle MkWeakOp [mkZ, mkM, mkM, mkP] mkM }
1126 has_side_effects = True
1129 primop DeRefWeakOp "deRefWeak#" GenPrimOp
1130 Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, a #)
1132 usage = { mangle DeRefWeakOp [mkM, mkP] mkM }
1133 has_side_effects = True
1135 primop FinalizeWeakOp "finalizeWeak#" GenPrimOp
1136 Weak# a -> State# RealWorld -> (# State# RealWorld, Int#,
1137 (State# RealWorld -> (# State# RealWorld, Unit #)) #)
1139 usage = { mangle FinalizeWeakOp [mkM, mkP]
1140 (mkR . (inUB FinalizeWeakOp
1141 [id,id,inFun FinalizeWeakOp mkR mkM])) }
1142 has_side_effects = True
1146 ------------------------------------------------------------------------
1147 --- Stable pointers and names ---
1148 ------------------------------------------------------------------------
1150 primop MakeStablePtrOp "makeStablePtr#" GenPrimOp
1151 a -> State# RealWorld -> (# State# RealWorld, StablePtr# a #)
1153 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1154 usage = { mangle MakeStablePtrOp [mkM, mkP] mkM }
1155 has_side_effects = True
1157 primop DeRefStablePtrOp "deRefStablePtr#" GenPrimOp
1158 StablePtr# a -> State# RealWorld -> (# State# RealWorld, a #)
1160 usage = { mangle DeRefStablePtrOp [mkM, mkP] mkM }
1161 needs_wrapper = True
1162 has_side_effects = True
1164 primop EqStablePtrOp "eqStablePtr#" GenPrimOp
1165 StablePtr# a -> StablePtr# a -> Int#
1167 usage = { mangle EqStablePtrOp [mkP, mkP] mkR }
1168 has_side_effects = True
1170 primop MakeStableNameOp "makeStableName#" GenPrimOp
1171 a -> State# RealWorld -> (# State# RealWorld, StableName# a #)
1173 usage = { mangle MakeStableNameOp [mkZ, mkP] mkR }
1174 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1175 needs_wrapper = True
1176 has_side_effects = True
1179 primop EqStableNameOp "eqStableName#" GenPrimOp
1180 StableName# a -> StableName# a -> Int#
1182 usage = { mangle EqStableNameOp [mkP, mkP] mkR }
1184 primop StableNameToIntOp "stableNameToInt#" GenPrimOp
1185 StableName# a -> Int#
1187 usage = { mangle StableNameToIntOp [mkP] mkR }
1189 ------------------------------------------------------------------------
1190 --- Unsafe pointer equality (#1 Bad Guy: Alistair Reid :) ---
1191 ------------------------------------------------------------------------
1193 primop ReallyUnsafePtrEqualityOp "reallyUnsafePtrEquality#" GenPrimOp
1196 usage = { mangle ReallyUnsafePtrEqualityOp [mkZ, mkZ] mkR }
1198 ------------------------------------------------------------------------
1200 ------------------------------------------------------------------------
1202 primop SeqOp "seq#" GenPrimOp
1205 usage = { mangle SeqOp [mkO] mkR }
1206 strictness = { \ arity -> StrictnessInfo [wwStrict] False }
1207 -- Seq is strict in its argument; see notes in ConFold.lhs
1208 has_side_effects = True
1210 primop ParOp "par#" GenPrimOp
1213 usage = { mangle ParOp [mkO] mkR }
1214 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
1215 -- Note that Par is lazy to avoid that the sparked thing
1216 -- gets evaluted strictly, which it should *not* be
1217 has_side_effects = True
1219 -- HWL: The first 4 Int# in all par... annotations denote:
1220 -- name, granularity info, size of result, degree of parallelism
1221 -- Same structure as _seq_ i.e. returns Int#
1222 -- KSW: v, the second arg in parAt# and parAtForNow#, is used only to determine
1223 -- `the processor containing the expression v'; it is not evaluated
1225 primop ParGlobalOp "parGlobal#" GenPrimOp
1226 a -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1228 usage = { mangle ParGlobalOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1229 has_side_effects = True
1231 primop ParLocalOp "parLocal#" GenPrimOp
1232 a -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1234 usage = { mangle ParLocalOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1235 has_side_effects = True
1237 primop ParAtOp "parAt#" GenPrimOp
1238 b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int#
1240 usage = { mangle ParAtOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM }
1241 has_side_effects = True
1243 primop ParAtAbsOp "parAtAbs#" GenPrimOp
1244 a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1246 usage = { mangle ParAtAbsOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1247 has_side_effects = True
1249 primop ParAtRelOp "parAtRel#" GenPrimOp
1250 a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1252 usage = { mangle ParAtRelOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1253 has_side_effects = True
1255 primop ParAtForNowOp "parAtForNow#" GenPrimOp
1256 b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int#
1258 usage = { mangle ParAtForNowOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM }
1259 has_side_effects = True
1261 -- copyable# and noFollow# have no corresponding entry in
1262 -- PrelGHC.hi-boot, so I don't know whether they should still
1263 -- be here or not. JRS, 15 Jan 01
1265 --primop CopyableOp "copyable#" GenPrimOp
1268 -- usage = { mangle CopyableOp [mkZ] mkR }
1269 -- has_side_effects = True
1271 --primop NoFollowOp "noFollow#" GenPrimOp
1274 -- usage = { mangle NoFollowOp [mkZ] mkR }
1275 -- has_side_effects = True
1278 ------------------------------------------------------------------------
1279 --- tag to enum stuff ---
1280 ------------------------------------------------------------------------
1282 primop DataToTagOp "dataToTag#" GenPrimOp
1285 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
1287 primop TagToEnumOp "tagToEnum#" GenPrimOp
1293 ------------------------------------------------------------------------
1295 ------------------------------------------------------------------------