1 -----------------------------------------------------------------------
2 -- $Id: primops.txt,v 1.14 2001/01/15 09:55:41 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 IntegerNegOp "negateInteger#" GenPrimOp
366 Int# -> ByteArr# -> (# Int#, ByteArr# #)
368 primop IntegerAddOp "plusInteger#" GenPrimOp
369 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
370 with commutable = True
373 primop IntegerSubOp "minusInteger#" GenPrimOp
374 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
375 with out_of_line = True
377 primop IntegerMulOp "timesInteger#" GenPrimOp
378 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
379 with commutable = True
382 primop IntegerGcdOp "gcdInteger#" GenPrimOp
383 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
384 with commutable = True
387 primop IntegerIntGcdOp "gcdIntegerInt#" GenPrimOp
388 Int# -> ByteArr# -> Int# -> Int#
389 with commutable = True
391 primop IntegerDivExactOp "divExactInteger#" GenPrimOp
392 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
393 with out_of_line = True
395 primop IntegerQuotOp "quotInteger#" GenPrimOp
396 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
397 with out_of_line = True
399 primop IntegerRemOp "remInteger#" GenPrimOp
400 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
401 with out_of_line = True
403 primop IntegerCmpOp "cmpInteger#" GenPrimOp
404 Int# -> ByteArr# -> Int# -> ByteArr# -> Int#
405 with needs_wrapper = True
407 primop IntegerCmpIntOp "cmpIntegerInt#" GenPrimOp
408 Int# -> ByteArr# -> Int# -> Int#
409 with needs_wrapper = True
411 primop IntegerQuotRemOp "quotRemInteger#" GenPrimOp
412 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr#, Int#, ByteArr# #)
416 primop IntegerDivModOp "divModInteger#" GenPrimOp
417 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr#, Int#, ByteArr# #)
421 primop Integer2IntOp "integer2Int#" GenPrimOp
422 Int# -> ByteArr# -> Int#
423 with needs_wrapper = True
425 primop Integer2WordOp "integer2Word#" GenPrimOp
426 Int# -> ByteArr# -> Word#
427 with needs_wrapper = True
429 primop IntegerToInt64Op "integerToInt64#" GenPrimOp
430 Int# -> ByteArr# -> Int64#
432 primop IntegerToWord64Op "integerToWord64#" GenPrimOp
433 Int# -> ByteArr# -> Word64#
435 primop IntegerAndOp "andInteger#" GenPrimOp
436 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
437 with out_of_line = True
439 primop IntegerOrOp "orInteger#" GenPrimOp
440 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
441 with out_of_line = True
443 primop IntegerXorOp "xorInteger#" GenPrimOp
444 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
445 with out_of_line = True
447 primop IntegerComplementOp "complementInteger#" GenPrimOp
448 Int# -> ByteArr# -> (# Int#, ByteArr# #)
449 with out_of_line = True
451 ------------------------------------------------------------------------
453 ------------------------------------------------------------------------
455 primop WordQuotOp "quotWord#" Dyadic Word# -> Word# -> Word#
456 primop WordRemOp "remWord#" Dyadic Word# -> Word# -> Word#
458 primop AndOp "and#" Dyadic
459 Word# -> Word# -> Word#
460 with commutable = True
462 primop OrOp "or#" Dyadic
463 Word# -> Word# -> Word#
464 with commutable = True
466 primop XorOp "xor#" Dyadic
467 Word# -> Word# -> Word#
468 with commutable = True
470 primop NotOp "not#" Monadic Word# -> Word#
472 primop SllOp "shiftL#" GenPrimOp Word# -> Int# -> Word#
473 primop SrlOp "shiftRL#" GenPrimOp Word# -> Int# -> Word#
476 primop Word2IntOp "word2Int#" GenPrimOp Word# -> Int#
478 primop Word2IntegerOp "word2Integer#" GenPrimOp
479 Word# -> (# Int#, ByteArr# #)
480 with out_of_line = True
482 primop WordGtOp "gtWord#" Compare Word# -> Word# -> Bool
483 primop WordGeOp "geWord#" Compare Word# -> Word# -> Bool
484 primop WordEqOp "eqWord#" Compare Word# -> Word# -> Bool
485 primop WordNeOp "neWord#" Compare Word# -> Word# -> Bool
486 primop WordLtOp "ltWord#" Compare Word# -> Word# -> Bool
487 primop WordLeOp "leWord#" Compare Word# -> Word# -> Bool
489 ------------------------------------------------------------------------
491 ------------------------------------------------------------------------
493 primop Word64ToIntegerOp "word64ToInteger#" GenPrimOp
494 Word64# -> (# Int#, ByteArr# #)
495 with out_of_line = True
498 ------------------------------------------------------------------------
500 ------------------------------------------------------------------------
502 primop NewByteArrayOp_Char "newByteArray#" GenPrimOp
503 Int# -> State# s -> (# State# s, MutByteArr# s #)
504 with out_of_line = True
507 primop ReadByteArrayOp_Char "readCharArray#" GenPrimOp
508 MutByteArr# s -> Int# -> State# s -> (# State# s, Char# #)
510 primop ReadByteArrayOp_Int "readIntArray#" GenPrimOp
511 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
513 primop ReadByteArrayOp_Word "readWordArray#" GenPrimOp
514 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
516 primop ReadByteArrayOp_Addr "readAddrArray#" GenPrimOp
517 MutByteArr# s -> Int# -> State# s -> (# State# s, Addr# #)
519 primop ReadByteArrayOp_Float "readFloatArray#" GenPrimOp
520 MutByteArr# s -> Int# -> State# s -> (# State# s, Float# #)
522 primop ReadByteArrayOp_Double "readDoubleArray#" GenPrimOp
523 MutByteArr# s -> Int# -> State# s -> (# State# s, Double# #)
525 primop ReadByteArrayOp_StablePtr "readStablePtrArray#" GenPrimOp
526 MutByteArr# s -> Int# -> State# s -> (# State# s, StablePtr# a #)
528 primop ReadByteArrayOp_Int8 "readInt8Array#" GenPrimOp
529 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
531 primop ReadByteArrayOp_Int16 "readInt16Array#" GenPrimOp
532 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
534 primop ReadByteArrayOp_Int32 "readInt32Array#" GenPrimOp
535 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
537 primop ReadByteArrayOp_Int64 "readInt64Array#" GenPrimOp
538 MutByteArr# s -> Int# -> State# s -> (# State# s, Int64# #)
540 primop ReadByteArrayOp_Word8 "readWord8Array#" GenPrimOp
541 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
543 primop ReadByteArrayOp_Word16 "readWord16Array#" GenPrimOp
544 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
546 primop ReadByteArrayOp_Word32 "readWord32Array#" GenPrimOp
547 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
549 primop ReadByteArrayOp_Word64 "readWord64Array#" GenPrimOp
550 MutByteArr# s -> Int# -> State# s -> (# State# s, Word64# #)
554 primop WriteByteArrayOp_Char "writeCharArray#" GenPrimOp
555 MutByteArr# s -> Int# -> Char# -> State# s -> State# s
556 with has_side_effects = True
558 primop WriteByteArrayOp_Int "writeIntArray#" GenPrimOp
559 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
560 with has_side_effects = True
562 primop WriteByteArrayOp_Word "writeWordArray#" GenPrimOp
563 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
564 with has_side_effects = True
566 primop WriteByteArrayOp_Addr "writeAddrArray#" GenPrimOp
567 MutByteArr# s -> Int# -> Addr# -> State# s -> State# s
568 with has_side_effects = True
570 primop WriteByteArrayOp_Float "writeFloatArray#" GenPrimOp
571 MutByteArr# s -> Int# -> Float# -> State# s -> State# s
572 with has_side_effects = True
574 primop WriteByteArrayOp_Double "writeDoubleArray#" GenPrimOp
575 MutByteArr# s -> Int# -> Double# -> State# s -> State# s
576 with has_side_effects = True
578 primop WriteByteArrayOp_StablePtr "writeStablePtrArray#" GenPrimOp
579 MutByteArr# s -> Int# -> StablePtr# a -> State# s -> State# s
580 with has_side_effects = True
582 primop WriteByteArrayOp_Int8 "writeInt8Array#" GenPrimOp
583 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
584 with has_side_effects = True
586 primop WriteByteArrayOp_Word8 "writeWord8Array#" GenPrimOp
587 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
588 with has_side_effects = True
590 primop WriteByteArrayOp_Int16 "writeInt16Array#" GenPrimOp
591 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
592 with has_side_effects = True
594 primop WriteByteArrayOp_Word16 "writeWord16Array#" GenPrimOp
595 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
596 with has_side_effects = True
598 primop WriteByteArrayOp_Int32 "writeInt32Array#" GenPrimOp
599 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
600 with has_side_effects = True
602 primop WriteByteArrayOp_Word32 "writeWord32Array#" GenPrimOp
603 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
604 with has_side_effects = True
606 primop WriteByteArrayOp_Int64 "writeInt64Array#" GenPrimOp
607 MutByteArr# s -> Int# -> Int64# -> State# s -> State# s
608 with has_side_effects = True
610 primop WriteByteArrayOp_Word64 "writeWord64Array#" GenPrimOp
611 MutByteArr# s -> Int# -> Word64# -> State# s -> State# s
612 with has_side_effects = True
615 primop IndexByteArrayOp_Char "indexCharArray#" GenPrimOp
616 ByteArr# -> Int# -> Char#
618 primop IndexByteArrayOp_Int "indexIntArray#" GenPrimOp
619 ByteArr# -> Int# -> Int#
621 primop IndexByteArrayOp_Word "indexWordArray#" GenPrimOp
622 ByteArr# -> Int# -> Word#
624 primop IndexByteArrayOp_Addr "indexAddrArray#" GenPrimOp
625 ByteArr# -> Int# -> Addr#
627 primop IndexByteArrayOp_Float "indexFloatArray#" GenPrimOp
628 ByteArr# -> Int# -> Float#
630 primop IndexByteArrayOp_Double "indexDoubleArray#" GenPrimOp
631 ByteArr# -> Int# -> Double#
633 primop IndexByteArrayOp_StablePtr "indexStablePtrArray#" GenPrimOp
634 ByteArr# -> Int# -> StablePtr# a
636 primop IndexByteArrayOp_Int8 "indexInt8Array#" GenPrimOp
637 ByteArr# -> Int# -> Int#
639 primop IndexByteArrayOp_Word8 "indexWord8Array#" GenPrimOp
640 ByteArr# -> Int# -> Word#
642 primop IndexByteArrayOp_Int16 "indexInt16Array#" GenPrimOp
643 ByteArr# -> Int# -> Int#
645 primop IndexByteArrayOp_Word16 "indexWord16Array#" GenPrimOp
646 ByteArr# -> Int# -> Word#
648 primop IndexByteArrayOp_Int32 "indexInt32Array#" GenPrimOp
649 ByteArr# -> Int# -> Int#
651 primop IndexByteArrayOp_Word32 "indexWord32Array#" GenPrimOp
652 ByteArr# -> Int# -> Word#
654 primop IndexByteArrayOp_Int64 "indexInt64Array#" GenPrimOp
655 ByteArr# -> Int# -> Int64#
657 primop IndexByteArrayOp_Word64 "indexWord64Array#" GenPrimOp
658 ByteArr# -> Int# -> Word64#
661 primop IndexOffAddrOp_Char "indexCharOffAddr#" GenPrimOp
662 Addr# -> Int# -> Char#
664 primop IndexOffAddrOp_Int "indexIntOffAddr#" GenPrimOp
665 Addr# -> Int# -> Int#
667 primop IndexOffAddrOp_Word "indexWordOffAddr#" GenPrimOp
668 Addr# -> Int# -> Word#
670 primop IndexOffAddrOp_Addr "indexAddrOffAddr#" GenPrimOp
671 Addr# -> Int# -> Addr#
673 primop IndexOffAddrOp_Float "indexFloatOffAddr#" GenPrimOp
674 Addr# -> Int# -> Float#
676 primop IndexOffAddrOp_Double "indexDoubleOffAddr#" GenPrimOp
677 Addr# -> Int# -> Double#
679 primop IndexOffAddrOp_StablePtr "indexStablePtrOffAddr#" GenPrimOp
680 Addr# -> Int# -> StablePtr# a
682 primop IndexOffAddrOp_Int8 "indexInt8OffAddr#" GenPrimOp
683 Addr# -> Int# -> Int#
685 primop IndexOffAddrOp_Word8 "indexWord8OffAddr#" GenPrimOp
686 Addr# -> Int# -> Word#
688 primop IndexOffAddrOp_Int16 "indexInt16OffAddr#" GenPrimOp
689 Addr# -> Int# -> Int#
691 primop IndexOffAddrOp_Word16 "indexWord16OffAddr#" GenPrimOp
692 Addr# -> Int# -> Word#
694 primop IndexOffAddrOp_Int32 "indexInt32OffAddr#" GenPrimOp
695 Addr# -> Int# -> Int#
697 primop IndexOffAddrOp_Word32 "indexWord32OffAddr#" GenPrimOp
698 Addr# -> Int# -> Word#
700 primop IndexOffAddrOp_Int64 "indexInt64OffAddr#" GenPrimOp
701 Addr# -> Int# -> Int64#
703 primop IndexOffAddrOp_Word64 "indexWord64OffAddr#" GenPrimOp
704 Addr# -> Int# -> Word64#
707 primop IndexOffForeignObjOp_Char "indexCharOffForeignObj#" GenPrimOp
708 ForeignObj# -> Int# -> Char#
710 primop IndexOffForeignObjOp_Int "indexIntOffForeignObj#" GenPrimOp
711 ForeignObj# -> Int# -> Int#
713 primop IndexOffForeignObjOp_Word "indexWordOffForeignObj#" GenPrimOp
714 ForeignObj# -> Int# -> Word#
716 primop IndexOffForeignObjOp_Addr "indexAddrOffForeignObj#" GenPrimOp
717 ForeignObj# -> Int# -> Addr#
719 primop IndexOffForeignObjOp_Float "indexFloatOffForeignObj#" GenPrimOp
720 ForeignObj# -> Int# -> Float#
722 primop IndexOffForeignObjOp_Double "indexDoubleOffForeignObj#" GenPrimOp
723 ForeignObj# -> Int# -> Double#
725 primop IndexOffForeignObjOp_StablePtr "indexStablePtrOffForeignObj#" GenPrimOp
726 ForeignObj# -> Int# -> StablePtr# a
728 primop IndexOffForeignObjOp_Int8 "indexInt8OffForeignObj#" GenPrimOp
729 ForeignObj# -> Int# -> Int#
731 primop IndexOffForeignObjOp_Word8 "indexWord8OffForeignObj#" GenPrimOp
732 ForeignObj# -> Int# -> Word#
734 primop IndexOffForeignObjOp_Int16 "indexInt16OffForeignObj#" GenPrimOp
735 ForeignObj# -> Int# -> Int#
737 primop IndexOffForeignObjOp_Word16 "indexWord16OffForeignObj#" GenPrimOp
738 ForeignObj# -> Int# -> Word#
740 primop IndexOffForeignObjOp_Int32 "indexInt32OffForeignObj#" GenPrimOp
741 ForeignObj# -> Int# -> Int#
743 primop IndexOffForeignObjOp_Word32 "indexWord32OffForeignObj#" GenPrimOp
744 ForeignObj# -> Int# -> Word#
746 primop IndexOffForeignObjOp_Int64 "indexInt64OffForeignObj#" GenPrimOp
747 ForeignObj# -> Int# -> Int64#
749 primop IndexOffForeignObjOp_Word64 "indexWord64OffForeignObj#" GenPrimOp
750 ForeignObj# -> Int# -> Word64#
754 primop ReadOffAddrOp_Char "readCharOffAddr#" GenPrimOp
755 Addr# -> Int# -> State# s -> (# State# s, Char# #)
757 primop ReadOffAddrOp_Int "readIntOffAddr#" GenPrimOp
758 Addr# -> Int# -> State# s -> (# State# s, Int# #)
760 primop ReadOffAddrOp_Word "readWordOffAddr#" GenPrimOp
761 Addr# -> Int# -> State# s -> (# State# s, Word# #)
763 primop ReadOffAddrOp_Addr "readAddrOffAddr#" GenPrimOp
764 Addr# -> Int# -> State# s -> (# State# s, Addr# #)
766 primop ReadOffAddrOp_Float "readFloatOffAddr#" GenPrimOp
767 Addr# -> Int# -> State# s -> (# State# s, Float# #)
769 primop ReadOffAddrOp_Double "readDoubleOffAddr#" GenPrimOp
770 Addr# -> Int# -> State# s -> (# State# s, Double# #)
772 primop ReadOffAddrOp_StablePtr "readStablePtrOffAddr#" GenPrimOp
773 Addr# -> Int# -> State# s -> (# State# s, StablePtr# a #)
775 primop ReadOffAddrOp_ForeignObj "readForeignObjOffAddr#" GenPrimOp
776 Addr# -> Int# -> State# s -> (# State# s, ForeignObj# #)
778 primop ReadOffAddrOp_Int8 "readInt8OffAddr#" GenPrimOp
779 Addr# -> Int# -> State# s -> (# State# s, Int# #)
781 primop ReadOffAddrOp_Word8 "readWord8OffAddr#" GenPrimOp
782 Addr# -> Int# -> State# s -> (# State# s, Word# #)
784 primop ReadOffAddrOp_Int16 "readInt16OffAddr#" GenPrimOp
785 Addr# -> Int# -> State# s -> (# State# s, Int# #)
787 primop ReadOffAddrOp_Word16 "readWord16OffAddr#" GenPrimOp
788 Addr# -> Int# -> State# s -> (# State# s, Word# #)
790 primop ReadOffAddrOp_Int32 "readInt32OffAddr#" GenPrimOp
791 Addr# -> Int# -> State# s -> (# State# s, Int# #)
793 primop ReadOffAddrOp_Word32 "readWord32OffAddr#" GenPrimOp
794 Addr# -> Int# -> State# s -> (# State# s, Word# #)
796 primop ReadOffAddrOp_Int64 "readInt64OffAddr#" GenPrimOp
797 Addr# -> Int# -> State# s -> (# State# s, Int64# #)
799 primop ReadOffAddrOp_Word64 "readWord64OffAddr#" GenPrimOp
800 Addr# -> Int# -> State# s -> (# State# s, Word64# #)
803 primop WriteOffAddrOp_Char "writeCharOffAddr#" GenPrimOp
804 Addr# -> Int# -> Char# -> State# s -> State# s
805 with has_side_effects = True
807 primop WriteOffAddrOp_Int "writeIntOffAddr#" GenPrimOp
808 Addr# -> Int# -> Int# -> State# s -> State# s
809 with has_side_effects = True
811 primop WriteOffAddrOp_Word "writeWordOffAddr#" GenPrimOp
812 Addr# -> Int# -> Word# -> State# s -> State# s
813 with has_side_effects = True
815 primop WriteOffAddrOp_Addr "writeAddrOffAddr#" GenPrimOp
816 Addr# -> Int# -> Addr# -> State# s -> State# s
817 with has_side_effects = True
819 primop WriteOffAddrOp_Float "writeFloatOffAddr#" GenPrimOp
820 Addr# -> Int# -> Float# -> State# s -> State# s
821 with has_side_effects = True
823 primop WriteOffAddrOp_Double "writeDoubleOffAddr#" GenPrimOp
824 Addr# -> Int# -> Double# -> State# s -> State# s
825 with has_side_effects = True
827 primop WriteOffAddrOp_StablePtr "writeStablePtrOffAddr#" GenPrimOp
828 Addr# -> Int# -> StablePtr# a -> State# s -> State# s
829 with has_side_effects = True
831 primop WriteOffAddrOp_ForeignObj "writeForeignObjOffAddr#" GenPrimOp
832 Addr# -> Int# -> ForeignObj# -> State# s -> State# s
833 with has_side_effects = True
835 primop WriteOffAddrOp_Int8 "writeInt8OffAddr#" GenPrimOp
836 Addr# -> Int# -> Int# -> State# s -> State# s
837 with has_side_effects = True
839 primop WriteOffAddrOp_Word8 "writeWord8OffAddr#" GenPrimOp
840 Addr# -> Int# -> Word# -> State# s -> State# s
841 with has_side_effects = True
843 primop WriteOffAddrOp_Int16 "writeInt16OffAddr#" GenPrimOp
844 Addr# -> Int# -> Int# -> State# s -> State# s
845 with has_side_effects = True
847 primop WriteOffAddrOp_Word16 "writeWord16OffAddr#" GenPrimOp
848 Addr# -> Int# -> Word# -> State# s -> State# s
849 with has_side_effects = True
851 primop WriteOffAddrOp_Int32 "writeInt32OffAddr#" GenPrimOp
852 Addr# -> Int# -> Int# -> State# s -> State# s
853 with has_side_effects = True
855 primop WriteOffAddrOp_Word32 "writeWord32OffAddr#" GenPrimOp
856 Addr# -> Int# -> Word# -> State# s -> State# s
857 with has_side_effects = True
859 primop WriteOffAddrOp_Int64 "writeInt64OffAddr#" GenPrimOp
860 Addr# -> Int# -> Int64# -> State# s -> State# s
861 with has_side_effects = True
863 primop WriteOffAddrOp_Word64 "writeWord64OffAddr#" GenPrimOp
864 Addr# -> Int# -> Word64# -> State# s -> State# s
865 with has_side_effects = True
869 primop NewArrayOp "newArray#" GenPrimOp
870 Int# -> a -> State# s -> (# State# s, MutArr# s a #)
872 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
873 usage = { mangle NewArrayOp [mkP, mkM, mkP] mkM }
876 primop SameMutableArrayOp "sameMutableArray#" GenPrimOp
877 MutArr# s a -> MutArr# s a -> Bool
879 usage = { mangle SameMutableArrayOp [mkP, mkP] mkM }
881 primop SameMutableByteArrayOp "sameMutableByteArray#" GenPrimOp
882 MutByteArr# s -> MutByteArr# s -> Bool
884 primop ReadArrayOp "readArray#" GenPrimOp
885 MutArr# s a -> Int# -> State# s -> (# State# s, a #)
887 usage = { mangle ReadArrayOp [mkM, mkP, mkP] mkM }
889 primop WriteArrayOp "writeArray#" GenPrimOp
890 MutArr# s a -> Int# -> a -> State# s -> State# s
892 usage = { mangle WriteArrayOp [mkM, mkP, mkM, mkP] mkR }
893 strictness = { \ arity -> StrictnessInfo [wwPrim, wwPrim, wwLazy, wwPrim] False }
894 has_side_effects = True
896 primop IndexArrayOp "indexArray#" GenPrimOp
897 Array# a -> Int# -> (# a #)
899 usage = { mangle IndexArrayOp [mkM, mkP] mkM }
901 primop UnsafeFreezeArrayOp "unsafeFreezeArray#" GenPrimOp
902 MutArr# s a -> State# s -> (# State# s, Array# a #)
904 usage = { mangle UnsafeFreezeArrayOp [mkM, mkP] mkM }
905 has_side_effects = True
907 primop UnsafeFreezeByteArrayOp "unsafeFreezeByteArray#" GenPrimOp
908 MutByteArr# s -> State# s -> (# State# s, ByteArr# #)
910 has_side_effects = True
912 primop UnsafeThawArrayOp "unsafeThawArray#" GenPrimOp
913 Array# a -> State# s -> (# State# s, MutArr# s a #)
915 usage = { mangle UnsafeThawArrayOp [mkM, mkP] mkM }
918 primop SizeofByteArrayOp "sizeofByteArray#" GenPrimOp
921 primop SizeofMutableByteArrayOp "sizeofMutableByteArray#" GenPrimOp
922 MutByteArr# s -> Int#
924 ------------------------------------------------------------------------
925 --- Mutable variables ---
926 ------------------------------------------------------------------------
928 primop NewMutVarOp "newMutVar#" GenPrimOp
929 a -> State# s -> (# State# s, MutVar# s a #)
931 usage = { mangle NewMutVarOp [mkM, mkP] mkM }
932 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
935 primop ReadMutVarOp "readMutVar#" GenPrimOp
936 MutVar# s a -> State# s -> (# State# s, a #)
938 usage = { mangle ReadMutVarOp [mkM, mkP] mkM }
940 primop WriteMutVarOp "writeMutVar#" GenPrimOp
941 MutVar# s a -> a -> State# s -> State# s
943 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
944 usage = { mangle WriteMutVarOp [mkM, mkM, mkP] mkR }
945 has_side_effects = True
947 primop SameMutVarOp "sameMutVar#" GenPrimOp
948 MutVar# s a -> MutVar# s a -> Bool
950 usage = { mangle SameMutVarOp [mkP, mkP] mkM }
952 ------------------------------------------------------------------------
954 ------------------------------------------------------------------------
956 primop CatchOp "catch#" GenPrimOp
957 (State# RealWorld -> (# State# RealWorld, a #) )
958 -> (b -> State# RealWorld -> (# State# RealWorld, a #) )
960 -> (# State# RealWorld, a #)
962 strictness = { \ arity -> StrictnessInfo [wwLazy, wwLazy, wwPrim] False }
963 -- Catch is actually strict in its first argument
964 -- but we don't want to tell the strictness
965 -- analyser about that!
966 usage = { mangle CatchOp [mkM, mkM . (inFun CatchOp mkM mkM), mkP] mkM }
967 -- [mkO, mkO . (inFun mkM mkO)] mkO
968 -- might use caught action multiply
971 primop RaiseOp "raise#" GenPrimOp
974 strictness = { \ arity -> StrictnessInfo [wwLazy] True }
975 -- NB: True => result is bottom
976 usage = { mangle RaiseOp [mkM] mkM }
979 primop BlockAsyncExceptionsOp "blockAsyncExceptions#" GenPrimOp
980 (State# RealWorld -> (# State# RealWorld, a #))
981 -> (State# RealWorld -> (# State# RealWorld, a #))
983 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
986 primop UnblockAsyncExceptionsOp "unblockAsyncExceptions#" GenPrimOp
987 (State# RealWorld -> (# State# RealWorld, a #))
988 -> (State# RealWorld -> (# State# RealWorld, a #))
990 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
993 ------------------------------------------------------------------------
994 --- MVars (not the same as mutable variables!) ---
995 ------------------------------------------------------------------------
997 primop NewMVarOp "newMVar#" GenPrimOp
998 State# s -> (# State# s, MVar# s a #)
1000 usage = { mangle NewMVarOp [mkP] mkR }
1003 primop TakeMVarOp "takeMVar#" GenPrimOp
1004 MVar# s a -> State# s -> (# State# s, a #)
1006 usage = { mangle TakeMVarOp [mkM, mkP] mkM }
1007 has_side_effects = True
1010 primop PutMVarOp "putMVar#" GenPrimOp
1011 MVar# s a -> a -> State# s -> State# s
1013 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
1014 usage = { mangle PutMVarOp [mkM, mkM, mkP] mkR }
1015 has_side_effects = True
1018 primop SameMVarOp "sameMVar#" GenPrimOp
1019 MVar# s a -> MVar# s a -> Bool
1021 usage = { mangle SameMVarOp [mkP, mkP] mkM }
1023 primop TryTakeMVarOp "tryTakeMVar#" GenPrimOp
1024 MVar# s a -> State# s -> (# State# s, Int#, a #)
1026 usage = { mangle TryTakeMVarOp [mkM, mkP] mkM }
1027 has_side_effects = True
1030 primop IsEmptyMVarOp "isEmptyMVar#" GenPrimOp
1031 MVar# s a -> State# s -> (# State# s, Int# #)
1033 usage = { mangle IsEmptyMVarOp [mkP, mkP] mkM }
1036 ------------------------------------------------------------------------
1037 --- delay/wait operations ---
1038 ------------------------------------------------------------------------
1040 primop DelayOp "delay#" GenPrimOp
1041 Int# -> State# s -> State# s
1043 needs_wrapper = True
1044 has_side_effects = True
1047 primop WaitReadOp "waitRead#" GenPrimOp
1048 Int# -> State# s -> State# s
1050 needs_wrapper = True
1051 has_side_effects = True
1054 primop WaitWriteOp "waitWrite#" GenPrimOp
1055 Int# -> State# s -> State# s
1057 needs_wrapper = True
1058 has_side_effects = True
1061 ------------------------------------------------------------------------
1062 --- concurrency primitives ---
1063 ------------------------------------------------------------------------
1065 primop ForkOp "fork#" GenPrimOp
1066 a -> State# RealWorld -> (# State# RealWorld, ThreadId# #)
1068 usage = { mangle ForkOp [mkO, mkP] mkR }
1069 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1070 has_side_effects = True
1073 primop KillThreadOp "killThread#" GenPrimOp
1074 ThreadId# -> a -> State# RealWorld -> State# RealWorld
1076 usage = { mangle KillThreadOp [mkP, mkM, mkP] mkR }
1077 has_side_effects = True
1080 primop YieldOp "yield#" GenPrimOp
1081 State# RealWorld -> State# RealWorld
1083 has_side_effects = True
1086 primop MyThreadIdOp "myThreadId#" GenPrimOp
1087 State# RealWorld -> (# State# RealWorld, ThreadId# #)
1089 ------------------------------------------------------------------------
1090 --- foreign objects ---
1091 ------------------------------------------------------------------------
1093 primop MkForeignObjOp "mkForeignObj#" GenPrimOp
1094 Addr# -> State# RealWorld -> (# State# RealWorld, ForeignObj# #)
1096 has_side_effects = True
1099 primop WriteForeignObjOp "writeForeignObj#" GenPrimOp
1100 ForeignObj# -> Addr# -> State# s -> State# s
1102 has_side_effects = True
1104 primop ForeignObjToAddrOp "foreignObjToAddr#" GenPrimOp
1105 ForeignObj# -> Addr#
1107 primop TouchOp "touch#" GenPrimOp
1108 o -> State# RealWorld -> State# RealWorld
1110 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1113 ------------------------------------------------------------------------
1114 --- Weak pointers ---
1115 ------------------------------------------------------------------------
1117 -- note that tyvar "o" denotes openAlphaTyVar
1119 primop MkWeakOp "mkWeak#" GenPrimOp
1120 o -> b -> c -> State# RealWorld -> (# State# RealWorld, Weak# b #)
1122 strictness = { \ arity -> StrictnessInfo [wwLazy, wwLazy, wwLazy, wwPrim] False }
1123 usage = { mangle MkWeakOp [mkZ, mkM, mkM, mkP] mkM }
1124 has_side_effects = True
1127 primop DeRefWeakOp "deRefWeak#" GenPrimOp
1128 Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, a #)
1130 usage = { mangle DeRefWeakOp [mkM, mkP] mkM }
1131 has_side_effects = True
1133 primop FinalizeWeakOp "finalizeWeak#" GenPrimOp
1134 Weak# a -> State# RealWorld -> (# State# RealWorld, Int#,
1135 (State# RealWorld -> (# State# RealWorld, Unit #)) #)
1137 usage = { mangle FinalizeWeakOp [mkM, mkP]
1138 (mkR . (inUB FinalizeWeakOp
1139 [id,id,inFun FinalizeWeakOp mkR mkM])) }
1140 has_side_effects = True
1144 ------------------------------------------------------------------------
1145 --- Stable pointers and names ---
1146 ------------------------------------------------------------------------
1148 primop MakeStablePtrOp "makeStablePtr#" GenPrimOp
1149 a -> State# RealWorld -> (# State# RealWorld, StablePtr# a #)
1151 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1152 usage = { mangle MakeStablePtrOp [mkM, mkP] mkM }
1153 has_side_effects = True
1155 primop DeRefStablePtrOp "deRefStablePtr#" GenPrimOp
1156 StablePtr# a -> State# RealWorld -> (# State# RealWorld, a #)
1158 usage = { mangle DeRefStablePtrOp [mkM, mkP] mkM }
1159 needs_wrapper = True
1160 has_side_effects = True
1162 primop EqStablePtrOp "eqStablePtr#" GenPrimOp
1163 StablePtr# a -> StablePtr# a -> Int#
1165 usage = { mangle EqStablePtrOp [mkP, mkP] mkR }
1166 has_side_effects = True
1168 primop MakeStableNameOp "makeStableName#" GenPrimOp
1169 a -> State# RealWorld -> (# State# RealWorld, StableName# a #)
1171 usage = { mangle MakeStableNameOp [mkZ, mkP] mkR }
1172 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1173 needs_wrapper = True
1174 has_side_effects = True
1177 primop EqStableNameOp "eqStableName#" GenPrimOp
1178 StableName# a -> StableName# a -> Int#
1180 usage = { mangle EqStableNameOp [mkP, mkP] mkR }
1182 primop StableNameToIntOp "stableNameToInt#" GenPrimOp
1183 StableName# a -> Int#
1185 usage = { mangle StableNameToIntOp [mkP] mkR }
1187 ------------------------------------------------------------------------
1188 --- Unsafe pointer equality (#1 Bad Guy: Alistair Reid :) ---
1189 ------------------------------------------------------------------------
1191 primop ReallyUnsafePtrEqualityOp "reallyUnsafePtrEquality#" GenPrimOp
1194 usage = { mangle ReallyUnsafePtrEqualityOp [mkZ, mkZ] mkR }
1196 ------------------------------------------------------------------------
1198 ------------------------------------------------------------------------
1200 primop SeqOp "seq#" GenPrimOp
1203 usage = { mangle SeqOp [mkO] mkR }
1204 strictness = { \ arity -> StrictnessInfo [wwStrict] False }
1205 -- Seq is strict in its argument; see notes in ConFold.lhs
1206 has_side_effects = True
1208 primop ParOp "par#" GenPrimOp
1211 usage = { mangle ParOp [mkO] mkR }
1212 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
1213 -- Note that Par is lazy to avoid that the sparked thing
1214 -- gets evaluted strictly, which it should *not* be
1215 has_side_effects = True
1217 -- HWL: The first 4 Int# in all par... annotations denote:
1218 -- name, granularity info, size of result, degree of parallelism
1219 -- Same structure as _seq_ i.e. returns Int#
1220 -- KSW: v, the second arg in parAt# and parAtForNow#, is used only to determine
1221 -- `the processor containing the expression v'; it is not evaluated
1223 primop ParGlobalOp "parGlobal#" GenPrimOp
1224 a -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1226 usage = { mangle ParGlobalOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1227 has_side_effects = True
1229 primop ParLocalOp "parLocal#" GenPrimOp
1230 a -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1232 usage = { mangle ParLocalOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1233 has_side_effects = True
1235 primop ParAtOp "parAt#" GenPrimOp
1236 b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int#
1238 usage = { mangle ParAtOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM }
1239 has_side_effects = True
1241 primop ParAtAbsOp "parAtAbs#" GenPrimOp
1242 a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1244 usage = { mangle ParAtAbsOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1245 has_side_effects = True
1247 primop ParAtRelOp "parAtRel#" GenPrimOp
1248 a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1250 usage = { mangle ParAtRelOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1251 has_side_effects = True
1253 primop ParAtForNowOp "parAtForNow#" GenPrimOp
1254 b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int#
1256 usage = { mangle ParAtForNowOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM }
1257 has_side_effects = True
1259 primop CopyableOp "copyable#" GenPrimOp
1262 usage = { mangle CopyableOp [mkZ] mkR }
1263 has_side_effects = True
1265 primop NoFollowOp "noFollow#" GenPrimOp
1268 usage = { mangle NoFollowOp [mkZ] mkR }
1269 has_side_effects = True
1272 ------------------------------------------------------------------------
1273 --- tag to enum stuff ---
1274 ------------------------------------------------------------------------
1276 primop DataToTagOp "dataToTag#" GenPrimOp
1279 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
1281 primop TagToEnumOp "tagToEnum#" GenPrimOp
1287 ------------------------------------------------------------------------
1289 ------------------------------------------------------------------------