1 -----------------------------------------------------------------------
2 -- $Id: primops.txt,v 1.13 2001/01/03 16:44:29 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 linker ---
47 ------------------------------------------------------------------------
49 -- Convert an Addr# to a followable type
50 primop AddrToHValueOp "addrToHValue#" GenPrimOp
54 ------------------------------------------------------------------------
56 ------------------------------------------------------------------------
58 primop AddrGtOp "gtAddr#" Compare Addr# -> Addr# -> Bool
59 primop AddrGeOp "geAddr#" Compare Addr# -> Addr# -> Bool
60 primop AddrEqOp "eqAddr#" Compare Addr# -> Addr# -> Bool
61 primop AddrNeOp "neAddr#" Compare Addr# -> Addr# -> Bool
62 primop AddrLtOp "ltAddr#" Compare Addr# -> Addr# -> Bool
63 primop AddrLeOp "leAddr#" Compare Addr# -> Addr# -> Bool
65 primop Addr2IntOp "addr2Int#" GenPrimOp Addr# -> Int#
68 ------------------------------------------------------------------------
70 ------------------------------------------------------------------------
72 primop CharGtOp "gtChar#" Compare Char# -> Char# -> Bool
73 primop CharGeOp "geChar#" Compare Char# -> Char# -> Bool
75 primop CharEqOp "eqChar#" Compare
76 Char# -> Char# -> Bool
77 with commutable = True
79 primop CharNeOp "neChar#" Compare
80 Char# -> Char# -> Bool
81 with commutable = True
83 primop CharLtOp "ltChar#" Compare Char# -> Char# -> Bool
84 primop CharLeOp "leChar#" Compare Char# -> Char# -> Bool
86 primop OrdOp "ord#" GenPrimOp Char# -> Int#
88 ------------------------------------------------------------------------
90 ------------------------------------------------------------------------
92 primop DoubleGtOp ">##" Compare Double# -> Double# -> Bool
93 primop DoubleGeOp ">=##" Compare Double# -> Double# -> Bool
95 primop DoubleEqOp "==##" Compare
96 Double# -> Double# -> Bool
97 with commutable = True
99 primop DoubleNeOp "/=##" Compare
100 Double# -> Double# -> Bool
101 with commutable = True
103 primop DoubleLtOp "<##" Compare Double# -> Double# -> Bool
104 primop DoubleLeOp "<=##" Compare Double# -> Double# -> Bool
106 primop DoubleAddOp "+##" Dyadic
107 Double# -> Double# -> Double#
108 with commutable = True
110 primop DoubleSubOp "-##" Dyadic Double# -> Double# -> Double#
112 primop DoubleMulOp "*##" Dyadic
113 Double# -> Double# -> Double#
114 with commutable = True
116 primop DoubleDivOp "/##" Dyadic
117 Double# -> Double# -> Double#
120 primop DoubleNegOp "negateDouble#" Monadic Double# -> Double#
122 primop Double2IntOp "double2Int#" GenPrimOp Double# -> Int#
123 primop Double2FloatOp "double2Float#" GenPrimOp Double# -> Float#
125 primop DoubleExpOp "expDouble#" Monadic
127 with needs_wrapper = True
129 primop DoubleLogOp "logDouble#" Monadic
135 primop DoubleSqrtOp "sqrtDouble#" Monadic
137 with needs_wrapper = True
139 primop DoubleSinOp "sinDouble#" Monadic
141 with needs_wrapper = True
143 primop DoubleCosOp "cosDouble#" Monadic
145 with needs_wrapper = True
147 primop DoubleTanOp "tanDouble#" Monadic
149 with needs_wrapper = True
151 primop DoubleAsinOp "asinDouble#" Monadic
157 primop DoubleAcosOp "acosDouble#" Monadic
163 primop DoubleAtanOp "atanDouble#" Monadic
168 primop DoubleSinhOp "sinhDouble#" Monadic
170 with needs_wrapper = True
172 primop DoubleCoshOp "coshDouble#" Monadic
174 with needs_wrapper = True
176 primop DoubleTanhOp "tanhDouble#" Monadic
178 with needs_wrapper = True
180 primop DoublePowerOp "**##" Dyadic
181 Double# -> Double# -> Double#
182 with needs_wrapper = True
184 primop DoubleDecodeOp "decodeDouble#" GenPrimOp
185 Double# -> (# Int#, Int#, ByteArr# #)
186 with out_of_line = True
188 ------------------------------------------------------------------------
190 ------------------------------------------------------------------------
192 primop FloatGtOp "gtFloat#" Compare Float# -> Float# -> Bool
193 primop FloatGeOp "geFloat#" Compare Float# -> Float# -> Bool
195 primop FloatEqOp "eqFloat#" Compare
196 Float# -> Float# -> Bool
197 with commutable = True
199 primop FloatNeOp "neFloat#" Compare
200 Float# -> Float# -> Bool
201 with commutable = True
203 primop FloatLtOp "ltFloat#" Compare Float# -> Float# -> Bool
204 primop FloatLeOp "leFloat#" Compare Float# -> Float# -> Bool
206 primop FloatAddOp "plusFloat#" Dyadic
207 Float# -> Float# -> Float#
208 with commutable = True
210 primop FloatSubOp "minusFloat#" Dyadic Float# -> Float# -> Float#
212 primop FloatMulOp "timesFloat#" Dyadic
213 Float# -> Float# -> Float#
214 with commutable = True
216 primop FloatDivOp "divideFloat#" Dyadic
217 Float# -> Float# -> Float#
220 primop FloatNegOp "negateFloat#" Monadic Float# -> Float#
222 primop Float2IntOp "float2Int#" GenPrimOp Float# -> Int#
224 primop FloatExpOp "expFloat#" Monadic
226 with needs_wrapper = True
228 primop FloatLogOp "logFloat#" Monadic
230 with needs_wrapper = True
233 primop FloatSqrtOp "sqrtFloat#" Monadic
235 with needs_wrapper = True
237 primop FloatSinOp "sinFloat#" Monadic
239 with needs_wrapper = True
241 primop FloatCosOp "cosFloat#" Monadic
243 with needs_wrapper = True
245 primop FloatTanOp "tanFloat#" Monadic
247 with needs_wrapper = True
249 primop FloatAsinOp "asinFloat#" Monadic
251 with needs_wrapper = True
254 primop FloatAcosOp "acosFloat#" Monadic
256 with needs_wrapper = True
259 primop FloatAtanOp "atanFloat#" Monadic
261 with needs_wrapper = True
263 primop FloatSinhOp "sinhFloat#" Monadic
265 with needs_wrapper = True
267 primop FloatCoshOp "coshFloat#" Monadic
269 with needs_wrapper = True
271 primop FloatTanhOp "tanhFloat#" Monadic
273 with needs_wrapper = True
275 primop FloatPowerOp "powerFloat#" Dyadic
276 Float# -> Float# -> Float#
277 with needs_wrapper = True
279 primop Float2DoubleOp "float2Double#" GenPrimOp Float# -> Double#
281 primop FloatDecodeOp "decodeFloat#" GenPrimOp
282 Float# -> (# Int#, Int#, ByteArr# #)
283 with out_of_line = True
285 ------------------------------------------------------------------------
287 ------------------------------------------------------------------------
289 primop IntAddOp "+#" Dyadic
291 with commutable = True
293 primop IntSubOp "-#" Dyadic Int# -> Int# -> Int#
296 Dyadic Int# -> Int# -> Int#
297 with commutable = True
299 primop IntQuotOp "quotInt#" Dyadic
303 primop IntRemOp "remInt#" Dyadic
307 primop IntGcdOp "gcdInt#" Dyadic Int# -> Int# -> Int#
308 primop IntNegOp "negateInt#" Monadic Int# -> Int#
309 primop IntAddCOp "addIntC#" GenPrimOp Int# -> Int# -> (# Int#, Int# #)
310 primop IntSubCOp "subIntC#" GenPrimOp Int# -> Int# -> (# Int#, Int# #)
311 primop IntMulCOp "mulIntC#" GenPrimOp Int# -> Int# -> (# Int#, Int# #)
312 primop IntGtOp ">#" Compare Int# -> Int# -> Bool
313 primop IntGeOp ">=#" Compare Int# -> Int# -> Bool
315 primop IntEqOp "==#" Compare
317 with commutable = True
319 primop IntNeOp "/=#" Compare
321 with commutable = True
323 primop IntLtOp "<#" Compare Int# -> Int# -> Bool
324 primop IntLeOp "<=#" Compare Int# -> Int# -> Bool
326 primop ChrOp "chr#" GenPrimOp Int# -> Char#
328 primop Int2WordOp "int2Word#" GenPrimOp Int# -> Word#
329 primop Int2AddrOp "int2Addr#"GenPrimOp Int# -> Addr#
330 primop Int2FloatOp "int2Float#" GenPrimOp Int# -> Float#
331 primop Int2DoubleOp "int2Double#" GenPrimOp Int# -> Double#
333 primop Int2IntegerOp "int2Integer#"
334 GenPrimOp Int# -> (# Int#, ByteArr# #)
335 with out_of_line = True
337 primop ISllOp "iShiftL#" GenPrimOp Int# -> Int# -> Int#
338 primop ISraOp "iShiftRA#" GenPrimOp Int# -> Int# -> Int#
339 primop ISrlOp "iShiftRL#" GenPrimOp Int# -> Int# -> Int#
341 ------------------------------------------------------------------------
343 ------------------------------------------------------------------------
345 primop Int64ToIntegerOp "int64ToInteger#" GenPrimOp
346 Int64# -> (# Int#, ByteArr# #)
347 with out_of_line = True
350 ------------------------------------------------------------------------
352 ------------------------------------------------------------------------
354 primop IntegerNegOp "negateInteger#" GenPrimOp
355 Int# -> ByteArr# -> (# Int#, ByteArr# #)
357 primop IntegerAddOp "plusInteger#" GenPrimOp
358 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
359 with commutable = True
362 primop IntegerSubOp "minusInteger#" GenPrimOp
363 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
364 with out_of_line = True
366 primop IntegerMulOp "timesInteger#" GenPrimOp
367 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
368 with commutable = True
371 primop IntegerGcdOp "gcdInteger#" GenPrimOp
372 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
373 with commutable = True
376 primop IntegerIntGcdOp "gcdIntegerInt#" GenPrimOp
377 Int# -> ByteArr# -> Int# -> Int#
378 with commutable = True
380 primop IntegerDivExactOp "divExactInteger#" GenPrimOp
381 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
382 with out_of_line = True
384 primop IntegerQuotOp "quotInteger#" GenPrimOp
385 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
386 with out_of_line = True
388 primop IntegerRemOp "remInteger#" GenPrimOp
389 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
390 with out_of_line = True
392 primop IntegerCmpOp "cmpInteger#" GenPrimOp
393 Int# -> ByteArr# -> Int# -> ByteArr# -> Int#
394 with needs_wrapper = True
396 primop IntegerCmpIntOp "cmpIntegerInt#" GenPrimOp
397 Int# -> ByteArr# -> Int# -> Int#
398 with needs_wrapper = True
400 primop IntegerQuotRemOp "quotRemInteger#" GenPrimOp
401 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr#, Int#, ByteArr# #)
405 primop IntegerDivModOp "divModInteger#" GenPrimOp
406 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr#, Int#, ByteArr# #)
410 primop Integer2IntOp "integer2Int#" GenPrimOp
411 Int# -> ByteArr# -> Int#
412 with needs_wrapper = True
414 primop Integer2WordOp "integer2Word#" GenPrimOp
415 Int# -> ByteArr# -> Word#
416 with needs_wrapper = True
418 primop IntegerToInt64Op "integerToInt64#" GenPrimOp
419 Int# -> ByteArr# -> Int64#
421 primop IntegerToWord64Op "integerToWord64#" GenPrimOp
422 Int# -> ByteArr# -> Word64#
424 primop IntegerAndOp "andInteger#" GenPrimOp
425 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
426 with out_of_line = True
428 primop IntegerOrOp "orInteger#" GenPrimOp
429 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
430 with out_of_line = True
432 primop IntegerXorOp "xorInteger#" GenPrimOp
433 Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
434 with out_of_line = True
436 primop IntegerComplementOp "complementInteger#" GenPrimOp
437 Int# -> ByteArr# -> (# Int#, ByteArr# #)
438 with out_of_line = True
440 ------------------------------------------------------------------------
442 ------------------------------------------------------------------------
444 primop WordQuotOp "quotWord#" Dyadic Word# -> Word# -> Word#
445 primop WordRemOp "remWord#" Dyadic Word# -> Word# -> Word#
447 primop AndOp "and#" Dyadic
448 Word# -> Word# -> Word#
449 with commutable = True
451 primop OrOp "or#" Dyadic
452 Word# -> Word# -> Word#
453 with commutable = True
455 primop XorOp "xor#" Dyadic
456 Word# -> Word# -> Word#
457 with commutable = True
459 primop NotOp "not#" Monadic Word# -> Word#
461 primop SllOp "shiftL#" GenPrimOp Word# -> Int# -> Word#
462 primop SrlOp "shiftRL#" GenPrimOp Word# -> Int# -> Word#
465 primop Word2IntOp "word2Int#" GenPrimOp Word# -> Int#
467 primop Word2IntegerOp "word2Integer#" GenPrimOp
468 Word# -> (# Int#, ByteArr# #)
469 with out_of_line = True
471 primop WordGtOp "gtWord#" Compare Word# -> Word# -> Bool
472 primop WordGeOp "geWord#" Compare Word# -> Word# -> Bool
473 primop WordEqOp "eqWord#" Compare Word# -> Word# -> Bool
474 primop WordNeOp "neWord#" Compare Word# -> Word# -> Bool
475 primop WordLtOp "ltWord#" Compare Word# -> Word# -> Bool
476 primop WordLeOp "leWord#" Compare Word# -> Word# -> Bool
478 ------------------------------------------------------------------------
480 ------------------------------------------------------------------------
482 primop Word64ToIntegerOp "word64ToInteger#" GenPrimOp
483 Word64# -> (# Int#, ByteArr# #)
484 with out_of_line = True
487 ------------------------------------------------------------------------
489 ------------------------------------------------------------------------
491 primop NewByteArrayOp_Char "newByteArray#" GenPrimOp
492 Int# -> State# s -> (# State# s, MutByteArr# s #)
493 with out_of_line = True
496 primop ReadByteArrayOp_Char "readCharArray#" GenPrimOp
497 MutByteArr# s -> Int# -> State# s -> (# State# s, Char# #)
499 primop ReadByteArrayOp_Int "readIntArray#" GenPrimOp
500 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
502 primop ReadByteArrayOp_Word "readWordArray#" GenPrimOp
503 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
505 primop ReadByteArrayOp_Addr "readAddrArray#" GenPrimOp
506 MutByteArr# s -> Int# -> State# s -> (# State# s, Addr# #)
508 primop ReadByteArrayOp_Float "readFloatArray#" GenPrimOp
509 MutByteArr# s -> Int# -> State# s -> (# State# s, Float# #)
511 primop ReadByteArrayOp_Double "readDoubleArray#" GenPrimOp
512 MutByteArr# s -> Int# -> State# s -> (# State# s, Double# #)
514 primop ReadByteArrayOp_StablePtr "readStablePtrArray#" GenPrimOp
515 MutByteArr# s -> Int# -> State# s -> (# State# s, StablePtr# a #)
517 primop ReadByteArrayOp_Int8 "readInt8Array#" GenPrimOp
518 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
520 primop ReadByteArrayOp_Int16 "readInt16Array#" GenPrimOp
521 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
523 primop ReadByteArrayOp_Int32 "readInt32Array#" GenPrimOp
524 MutByteArr# s -> Int# -> State# s -> (# State# s, Int# #)
526 primop ReadByteArrayOp_Int64 "readInt64Array#" GenPrimOp
527 MutByteArr# s -> Int# -> State# s -> (# State# s, Int64# #)
529 primop ReadByteArrayOp_Word8 "readWord8Array#" GenPrimOp
530 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
532 primop ReadByteArrayOp_Word16 "readWord16Array#" GenPrimOp
533 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
535 primop ReadByteArrayOp_Word32 "readWord32Array#" GenPrimOp
536 MutByteArr# s -> Int# -> State# s -> (# State# s, Word# #)
538 primop ReadByteArrayOp_Word64 "readWord64Array#" GenPrimOp
539 MutByteArr# s -> Int# -> State# s -> (# State# s, Word64# #)
543 primop WriteByteArrayOp_Char "writeCharArray#" GenPrimOp
544 MutByteArr# s -> Int# -> Char# -> State# s -> State# s
545 with has_side_effects = True
547 primop WriteByteArrayOp_Int "writeIntArray#" GenPrimOp
548 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
549 with has_side_effects = True
551 primop WriteByteArrayOp_Word "writeWordArray#" GenPrimOp
552 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
553 with has_side_effects = True
555 primop WriteByteArrayOp_Addr "writeAddrArray#" GenPrimOp
556 MutByteArr# s -> Int# -> Addr# -> State# s -> State# s
557 with has_side_effects = True
559 primop WriteByteArrayOp_Float "writeFloatArray#" GenPrimOp
560 MutByteArr# s -> Int# -> Float# -> State# s -> State# s
561 with has_side_effects = True
563 primop WriteByteArrayOp_Double "writeDoubleArray#" GenPrimOp
564 MutByteArr# s -> Int# -> Double# -> State# s -> State# s
565 with has_side_effects = True
567 primop WriteByteArrayOp_StablePtr "writeStablePtrArray#" GenPrimOp
568 MutByteArr# s -> Int# -> StablePtr# a -> State# s -> State# s
569 with has_side_effects = True
571 primop WriteByteArrayOp_Int8 "writeInt8Array#" GenPrimOp
572 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
573 with has_side_effects = True
575 primop WriteByteArrayOp_Word8 "writeWord8Array#" GenPrimOp
576 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
577 with has_side_effects = True
579 primop WriteByteArrayOp_Int16 "writeInt16Array#" GenPrimOp
580 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
581 with has_side_effects = True
583 primop WriteByteArrayOp_Word16 "writeWord16Array#" GenPrimOp
584 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
585 with has_side_effects = True
587 primop WriteByteArrayOp_Int32 "writeInt32Array#" GenPrimOp
588 MutByteArr# s -> Int# -> Int# -> State# s -> State# s
589 with has_side_effects = True
591 primop WriteByteArrayOp_Word32 "writeWord32Array#" GenPrimOp
592 MutByteArr# s -> Int# -> Word# -> State# s -> State# s
593 with has_side_effects = True
595 primop WriteByteArrayOp_Int64 "writeInt64Array#" GenPrimOp
596 MutByteArr# s -> Int# -> Int64# -> State# s -> State# s
597 with has_side_effects = True
599 primop WriteByteArrayOp_Word64 "writeWord64Array#" GenPrimOp
600 MutByteArr# s -> Int# -> Word64# -> State# s -> State# s
601 with has_side_effects = True
604 primop IndexByteArrayOp_Char "indexCharArray#" GenPrimOp
605 ByteArr# -> Int# -> Char#
607 primop IndexByteArrayOp_Int "indexIntArray#" GenPrimOp
608 ByteArr# -> Int# -> Int#
610 primop IndexByteArrayOp_Word "indexWordArray#" GenPrimOp
611 ByteArr# -> Int# -> Word#
613 primop IndexByteArrayOp_Addr "indexAddrArray#" GenPrimOp
614 ByteArr# -> Int# -> Addr#
616 primop IndexByteArrayOp_Float "indexFloatArray#" GenPrimOp
617 ByteArr# -> Int# -> Float#
619 primop IndexByteArrayOp_Double "indexDoubleArray#" GenPrimOp
620 ByteArr# -> Int# -> Double#
622 primop IndexByteArrayOp_StablePtr "indexStablePtrArray#" GenPrimOp
623 ByteArr# -> Int# -> StablePtr# a
625 primop IndexByteArrayOp_Int8 "indexInt8Array#" GenPrimOp
626 ByteArr# -> Int# -> Int#
628 primop IndexByteArrayOp_Word8 "indexWord8Array#" GenPrimOp
629 ByteArr# -> Int# -> Word#
631 primop IndexByteArrayOp_Int16 "indexInt16Array#" GenPrimOp
632 ByteArr# -> Int# -> Int#
634 primop IndexByteArrayOp_Word16 "indexWord16Array#" GenPrimOp
635 ByteArr# -> Int# -> Word#
637 primop IndexByteArrayOp_Int32 "indexInt32Array#" GenPrimOp
638 ByteArr# -> Int# -> Int#
640 primop IndexByteArrayOp_Word32 "indexWord32Array#" GenPrimOp
641 ByteArr# -> Int# -> Word#
643 primop IndexByteArrayOp_Int64 "indexInt64Array#" GenPrimOp
644 ByteArr# -> Int# -> Int64#
646 primop IndexByteArrayOp_Word64 "indexWord64Array#" GenPrimOp
647 ByteArr# -> Int# -> Word64#
650 primop IndexOffAddrOp_Char "indexCharOffAddr#" GenPrimOp
651 Addr# -> Int# -> Char#
653 primop IndexOffAddrOp_Int "indexIntOffAddr#" GenPrimOp
654 Addr# -> Int# -> Int#
656 primop IndexOffAddrOp_Word "indexWordOffAddr#" GenPrimOp
657 Addr# -> Int# -> Word#
659 primop IndexOffAddrOp_Addr "indexAddrOffAddr#" GenPrimOp
660 Addr# -> Int# -> Addr#
662 primop IndexOffAddrOp_Float "indexFloatOffAddr#" GenPrimOp
663 Addr# -> Int# -> Float#
665 primop IndexOffAddrOp_Double "indexDoubleOffAddr#" GenPrimOp
666 Addr# -> Int# -> Double#
668 primop IndexOffAddrOp_StablePtr "indexStablePtrOffAddr#" GenPrimOp
669 Addr# -> Int# -> StablePtr# a
671 primop IndexOffAddrOp_Int8 "indexInt8OffAddr#" GenPrimOp
672 Addr# -> Int# -> Int#
674 primop IndexOffAddrOp_Word8 "indexWord8OffAddr#" GenPrimOp
675 Addr# -> Int# -> Word#
677 primop IndexOffAddrOp_Int16 "indexInt16OffAddr#" GenPrimOp
678 Addr# -> Int# -> Int#
680 primop IndexOffAddrOp_Word16 "indexWord16OffAddr#" GenPrimOp
681 Addr# -> Int# -> Word#
683 primop IndexOffAddrOp_Int32 "indexInt32OffAddr#" GenPrimOp
684 Addr# -> Int# -> Int#
686 primop IndexOffAddrOp_Word32 "indexWord32OffAddr#" GenPrimOp
687 Addr# -> Int# -> Word#
689 primop IndexOffAddrOp_Int64 "indexInt64OffAddr#" GenPrimOp
690 Addr# -> Int# -> Int64#
692 primop IndexOffAddrOp_Word64 "indexWord64OffAddr#" GenPrimOp
693 Addr# -> Int# -> Word64#
696 primop IndexOffForeignObjOp_Char "indexCharOffForeignObj#" GenPrimOp
697 ForeignObj# -> Int# -> Char#
699 primop IndexOffForeignObjOp_Int "indexIntOffForeignObj#" GenPrimOp
700 ForeignObj# -> Int# -> Int#
702 primop IndexOffForeignObjOp_Word "indexWordOffForeignObj#" GenPrimOp
703 ForeignObj# -> Int# -> Word#
705 primop IndexOffForeignObjOp_Addr "indexAddrOffForeignObj#" GenPrimOp
706 ForeignObj# -> Int# -> Addr#
708 primop IndexOffForeignObjOp_Float "indexFloatOffForeignObj#" GenPrimOp
709 ForeignObj# -> Int# -> Float#
711 primop IndexOffForeignObjOp_Double "indexDoubleOffForeignObj#" GenPrimOp
712 ForeignObj# -> Int# -> Double#
714 primop IndexOffForeignObjOp_StablePtr "indexStablePtrOffForeignObj#" GenPrimOp
715 ForeignObj# -> Int# -> StablePtr# a
717 primop IndexOffForeignObjOp_Int8 "indexInt8OffForeignObj#" GenPrimOp
718 ForeignObj# -> Int# -> Int#
720 primop IndexOffForeignObjOp_Word8 "indexWord8OffForeignObj#" GenPrimOp
721 ForeignObj# -> Int# -> Word#
723 primop IndexOffForeignObjOp_Int16 "indexInt16OffForeignObj#" GenPrimOp
724 ForeignObj# -> Int# -> Int#
726 primop IndexOffForeignObjOp_Word16 "indexWord16OffForeignObj#" GenPrimOp
727 ForeignObj# -> Int# -> Word#
729 primop IndexOffForeignObjOp_Int32 "indexInt32OffForeignObj#" GenPrimOp
730 ForeignObj# -> Int# -> Int#
732 primop IndexOffForeignObjOp_Word32 "indexWord32OffForeignObj#" GenPrimOp
733 ForeignObj# -> Int# -> Word#
735 primop IndexOffForeignObjOp_Int64 "indexInt64OffForeignObj#" GenPrimOp
736 ForeignObj# -> Int# -> Int64#
738 primop IndexOffForeignObjOp_Word64 "indexWord64OffForeignObj#" GenPrimOp
739 ForeignObj# -> Int# -> Word64#
743 primop ReadOffAddrOp_Char "readCharOffAddr#" GenPrimOp
744 Addr# -> Int# -> State# s -> (# State# s, Char# #)
746 primop ReadOffAddrOp_Int "readIntOffAddr#" GenPrimOp
747 Addr# -> Int# -> State# s -> (# State# s, Int# #)
749 primop ReadOffAddrOp_Word "readWordOffAddr#" GenPrimOp
750 Addr# -> Int# -> State# s -> (# State# s, Word# #)
752 primop ReadOffAddrOp_Addr "readAddrOffAddr#" GenPrimOp
753 Addr# -> Int# -> State# s -> (# State# s, Addr# #)
755 primop ReadOffAddrOp_Float "readFloatOffAddr#" GenPrimOp
756 Addr# -> Int# -> State# s -> (# State# s, Float# #)
758 primop ReadOffAddrOp_Double "readDoubleOffAddr#" GenPrimOp
759 Addr# -> Int# -> State# s -> (# State# s, Double# #)
761 primop ReadOffAddrOp_StablePtr "readStablePtrOffAddr#" GenPrimOp
762 Addr# -> Int# -> State# s -> (# State# s, StablePtr# a #)
764 primop ReadOffAddrOp_ForeignObj "readForeignObjOffAddr#" GenPrimOp
765 Addr# -> Int# -> State# s -> (# State# s, ForeignObj# #)
767 primop ReadOffAddrOp_Int8 "readInt8OffAddr#" GenPrimOp
768 Addr# -> Int# -> State# s -> (# State# s, Int# #)
770 primop ReadOffAddrOp_Word8 "readWord8OffAddr#" GenPrimOp
771 Addr# -> Int# -> State# s -> (# State# s, Word# #)
773 primop ReadOffAddrOp_Int16 "readInt16OffAddr#" GenPrimOp
774 Addr# -> Int# -> State# s -> (# State# s, Int# #)
776 primop ReadOffAddrOp_Word16 "readWord16OffAddr#" GenPrimOp
777 Addr# -> Int# -> State# s -> (# State# s, Word# #)
779 primop ReadOffAddrOp_Int32 "readInt32OffAddr#" GenPrimOp
780 Addr# -> Int# -> State# s -> (# State# s, Int# #)
782 primop ReadOffAddrOp_Word32 "readWord32OffAddr#" GenPrimOp
783 Addr# -> Int# -> State# s -> (# State# s, Word# #)
785 primop ReadOffAddrOp_Int64 "readInt64OffAddr#" GenPrimOp
786 Addr# -> Int# -> State# s -> (# State# s, Int64# #)
788 primop ReadOffAddrOp_Word64 "readWord64OffAddr#" GenPrimOp
789 Addr# -> Int# -> State# s -> (# State# s, Word64# #)
792 primop WriteOffAddrOp_Char "writeCharOffAddr#" GenPrimOp
793 Addr# -> Int# -> Char# -> State# s -> State# s
794 with has_side_effects = True
796 primop WriteOffAddrOp_Int "writeIntOffAddr#" GenPrimOp
797 Addr# -> Int# -> Int# -> State# s -> State# s
798 with has_side_effects = True
800 primop WriteOffAddrOp_Word "writeWordOffAddr#" GenPrimOp
801 Addr# -> Int# -> Word# -> State# s -> State# s
802 with has_side_effects = True
804 primop WriteOffAddrOp_Addr "writeAddrOffAddr#" GenPrimOp
805 Addr# -> Int# -> Addr# -> State# s -> State# s
806 with has_side_effects = True
808 primop WriteOffAddrOp_Float "writeFloatOffAddr#" GenPrimOp
809 Addr# -> Int# -> Float# -> State# s -> State# s
810 with has_side_effects = True
812 primop WriteOffAddrOp_Double "writeDoubleOffAddr#" GenPrimOp
813 Addr# -> Int# -> Double# -> State# s -> State# s
814 with has_side_effects = True
816 primop WriteOffAddrOp_StablePtr "writeStablePtrOffAddr#" GenPrimOp
817 Addr# -> Int# -> StablePtr# a -> State# s -> State# s
818 with has_side_effects = True
820 primop WriteOffAddrOp_ForeignObj "writeForeignObjOffAddr#" GenPrimOp
821 Addr# -> Int# -> ForeignObj# -> State# s -> State# s
822 with has_side_effects = True
824 primop WriteOffAddrOp_Int8 "writeInt8OffAddr#" GenPrimOp
825 Addr# -> Int# -> Int# -> State# s -> State# s
826 with has_side_effects = True
828 primop WriteOffAddrOp_Word8 "writeWord8OffAddr#" GenPrimOp
829 Addr# -> Int# -> Word# -> State# s -> State# s
830 with has_side_effects = True
832 primop WriteOffAddrOp_Int16 "writeInt16OffAddr#" GenPrimOp
833 Addr# -> Int# -> Int# -> State# s -> State# s
834 with has_side_effects = True
836 primop WriteOffAddrOp_Word16 "writeWord16OffAddr#" GenPrimOp
837 Addr# -> Int# -> Word# -> State# s -> State# s
838 with has_side_effects = True
840 primop WriteOffAddrOp_Int32 "writeInt32OffAddr#" GenPrimOp
841 Addr# -> Int# -> Int# -> State# s -> State# s
842 with has_side_effects = True
844 primop WriteOffAddrOp_Word32 "writeWord32OffAddr#" GenPrimOp
845 Addr# -> Int# -> Word# -> State# s -> State# s
846 with has_side_effects = True
848 primop WriteOffAddrOp_Int64 "writeInt64OffAddr#" GenPrimOp
849 Addr# -> Int# -> Int64# -> State# s -> State# s
850 with has_side_effects = True
852 primop WriteOffAddrOp_Word64 "writeWord64OffAddr#" GenPrimOp
853 Addr# -> Int# -> Word64# -> State# s -> State# s
854 with has_side_effects = True
858 primop NewArrayOp "newArray#" GenPrimOp
859 Int# -> a -> State# s -> (# State# s, MutArr# s a #)
861 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
862 usage = { mangle NewArrayOp [mkP, mkM, mkP] mkM }
865 primop SameMutableArrayOp "sameMutableArray#" GenPrimOp
866 MutArr# s a -> MutArr# s a -> Bool
868 usage = { mangle SameMutableArrayOp [mkP, mkP] mkM }
870 primop SameMutableByteArrayOp "sameMutableByteArray#" GenPrimOp
871 MutByteArr# s -> MutByteArr# s -> Bool
873 primop ReadArrayOp "readArray#" GenPrimOp
874 MutArr# s a -> Int# -> State# s -> (# State# s, a #)
876 usage = { mangle ReadArrayOp [mkM, mkP, mkP] mkM }
878 primop WriteArrayOp "writeArray#" GenPrimOp
879 MutArr# s a -> Int# -> a -> State# s -> State# s
881 usage = { mangle WriteArrayOp [mkM, mkP, mkM, mkP] mkR }
882 strictness = { \ arity -> StrictnessInfo [wwPrim, wwPrim, wwLazy, wwPrim] False }
883 has_side_effects = True
885 primop IndexArrayOp "indexArray#" GenPrimOp
886 Array# a -> Int# -> (# a #)
888 usage = { mangle IndexArrayOp [mkM, mkP] mkM }
890 primop UnsafeFreezeArrayOp "unsafeFreezeArray#" GenPrimOp
891 MutArr# s a -> State# s -> (# State# s, Array# a #)
893 usage = { mangle UnsafeFreezeArrayOp [mkM, mkP] mkM }
894 has_side_effects = True
896 primop UnsafeFreezeByteArrayOp "unsafeFreezeByteArray#" GenPrimOp
897 MutByteArr# s -> State# s -> (# State# s, ByteArr# #)
899 has_side_effects = True
901 primop UnsafeThawArrayOp "unsafeThawArray#" GenPrimOp
902 Array# a -> State# s -> (# State# s, MutArr# s a #)
904 usage = { mangle UnsafeThawArrayOp [mkM, mkP] mkM }
907 primop SizeofByteArrayOp "sizeofByteArray#" GenPrimOp
910 primop SizeofMutableByteArrayOp "sizeofMutableByteArray#" GenPrimOp
911 MutByteArr# s -> Int#
913 ------------------------------------------------------------------------
914 --- Mutable variables ---
915 ------------------------------------------------------------------------
917 primop NewMutVarOp "newMutVar#" GenPrimOp
918 a -> State# s -> (# State# s, MutVar# s a #)
920 usage = { mangle NewMutVarOp [mkM, mkP] mkM }
921 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
924 primop ReadMutVarOp "readMutVar#" GenPrimOp
925 MutVar# s a -> State# s -> (# State# s, a #)
927 usage = { mangle ReadMutVarOp [mkM, mkP] mkM }
929 primop WriteMutVarOp "writeMutVar#" GenPrimOp
930 MutVar# s a -> a -> State# s -> State# s
932 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
933 usage = { mangle WriteMutVarOp [mkM, mkM, mkP] mkR }
934 has_side_effects = True
936 primop SameMutVarOp "sameMutVar#" GenPrimOp
937 MutVar# s a -> MutVar# s a -> Bool
939 usage = { mangle SameMutVarOp [mkP, mkP] mkM }
941 ------------------------------------------------------------------------
943 ------------------------------------------------------------------------
945 primop CatchOp "catch#" GenPrimOp
946 (State# RealWorld -> (# State# RealWorld, a #) )
947 -> (b -> State# RealWorld -> (# State# RealWorld, a #) )
949 -> (# State# RealWorld, a #)
951 strictness = { \ arity -> StrictnessInfo [wwLazy, wwLazy, wwPrim] False }
952 -- Catch is actually strict in its first argument
953 -- but we don't want to tell the strictness
954 -- analyser about that!
955 usage = { mangle CatchOp [mkM, mkM . (inFun CatchOp mkM mkM), mkP] mkM }
956 -- [mkO, mkO . (inFun mkM mkO)] mkO
957 -- might use caught action multiply
960 primop RaiseOp "raise#" GenPrimOp
963 strictness = { \ arity -> StrictnessInfo [wwLazy] True }
964 -- NB: True => result is bottom
965 usage = { mangle RaiseOp [mkM] mkM }
968 primop BlockAsyncExceptionsOp "blockAsyncExceptions#" GenPrimOp
969 (State# RealWorld -> (# State# RealWorld, a #))
970 -> (State# RealWorld -> (# State# RealWorld, a #))
972 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
975 primop UnblockAsyncExceptionsOp "unblockAsyncExceptions#" GenPrimOp
976 (State# RealWorld -> (# State# RealWorld, a #))
977 -> (State# RealWorld -> (# State# RealWorld, a #))
979 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
982 ------------------------------------------------------------------------
983 --- MVars (not the same as mutable variables!) ---
984 ------------------------------------------------------------------------
986 primop NewMVarOp "newMVar#" GenPrimOp
987 State# s -> (# State# s, MVar# s a #)
989 usage = { mangle NewMVarOp [mkP] mkR }
992 primop TakeMVarOp "takeMVar#" GenPrimOp
993 MVar# s a -> State# s -> (# State# s, a #)
995 usage = { mangle TakeMVarOp [mkM, mkP] mkM }
996 has_side_effects = True
999 primop PutMVarOp "putMVar#" GenPrimOp
1000 MVar# s a -> a -> State# s -> State# s
1002 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
1003 usage = { mangle PutMVarOp [mkM, mkM, mkP] mkR }
1004 has_side_effects = True
1007 primop SameMVarOp "sameMVar#" GenPrimOp
1008 MVar# s a -> MVar# s a -> Bool
1010 usage = { mangle SameMVarOp [mkP, mkP] mkM }
1012 primop TryTakeMVarOp "tryTakeMVar#" GenPrimOp
1013 MVar# s a -> State# s -> (# State# s, Int#, a #)
1015 usage = { mangle TryTakeMVarOp [mkM, mkP] mkM }
1016 has_side_effects = True
1019 primop IsEmptyMVarOp "isEmptyMVar#" GenPrimOp
1020 MVar# s a -> State# s -> (# State# s, Int# #)
1022 usage = { mangle IsEmptyMVarOp [mkP, mkP] mkM }
1025 ------------------------------------------------------------------------
1026 --- delay/wait operations ---
1027 ------------------------------------------------------------------------
1029 primop DelayOp "delay#" GenPrimOp
1030 Int# -> State# s -> State# s
1032 needs_wrapper = True
1033 has_side_effects = True
1036 primop WaitReadOp "waitRead#" GenPrimOp
1037 Int# -> State# s -> State# s
1039 needs_wrapper = True
1040 has_side_effects = True
1043 primop WaitWriteOp "waitWrite#" GenPrimOp
1044 Int# -> State# s -> State# s
1046 needs_wrapper = True
1047 has_side_effects = True
1050 ------------------------------------------------------------------------
1051 --- concurrency primitives ---
1052 ------------------------------------------------------------------------
1054 primop ForkOp "fork#" GenPrimOp
1055 a -> State# RealWorld -> (# State# RealWorld, ThreadId# #)
1057 usage = { mangle ForkOp [mkO, mkP] mkR }
1058 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1059 has_side_effects = True
1062 primop KillThreadOp "killThread#" GenPrimOp
1063 ThreadId# -> a -> State# RealWorld -> State# RealWorld
1065 usage = { mangle KillThreadOp [mkP, mkM, mkP] mkR }
1066 has_side_effects = True
1069 primop YieldOp "yield#" GenPrimOp
1070 State# RealWorld -> State# RealWorld
1072 has_side_effects = True
1075 primop MyThreadIdOp "myThreadId#" GenPrimOp
1076 State# RealWorld -> (# State# RealWorld, ThreadId# #)
1078 ------------------------------------------------------------------------
1079 --- foreign objects ---
1080 ------------------------------------------------------------------------
1082 primop MkForeignObjOp "mkForeignObj#" GenPrimOp
1083 Addr# -> State# RealWorld -> (# State# RealWorld, ForeignObj# #)
1085 has_side_effects = True
1088 primop WriteForeignObjOp "writeForeignObj#" GenPrimOp
1089 ForeignObj# -> Addr# -> State# s -> State# s
1091 has_side_effects = True
1093 primop ForeignObjToAddrOp "foreignObjToAddr#" GenPrimOp
1094 ForeignObj# -> Addr#
1096 primop TouchOp "touch#" GenPrimOp
1097 o -> State# RealWorld -> State# RealWorld
1099 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1101 ------------------------------------------------------------------------
1102 --- Bytecode objects ---
1103 ------------------------------------------------------------------------
1105 primop NewBCOOp "newBCO#" GenPrimOp
1106 ByteArr# -> ByteArr# -> Array# a -> ByteArr# -> State# s -> (# State# s, BCO# #)
1108 has_side_effects = True
1112 ------------------------------------------------------------------------
1113 --- Weak pointers ---
1114 ------------------------------------------------------------------------
1116 -- note that tyvar "o" denotes openAlphaTyVar
1118 primop MkWeakOp "mkWeak#" GenPrimOp
1119 o -> b -> c -> State# RealWorld -> (# State# RealWorld, Weak# b #)
1121 strictness = { \ arity -> StrictnessInfo [wwLazy, wwLazy, wwLazy, wwPrim] False }
1122 usage = { mangle MkWeakOp [mkZ, mkM, mkM, mkP] mkM }
1123 has_side_effects = True
1126 primop DeRefWeakOp "deRefWeak#" GenPrimOp
1127 Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, a #)
1129 usage = { mangle DeRefWeakOp [mkM, mkP] mkM }
1130 has_side_effects = True
1132 primop FinalizeWeakOp "finalizeWeak#" GenPrimOp
1133 Weak# a -> State# RealWorld -> (# State# RealWorld, Int#,
1134 (State# RealWorld -> (# State# RealWorld, Unit #)) #)
1136 usage = { mangle FinalizeWeakOp [mkM, mkP]
1137 (mkR . (inUB FinalizeWeakOp
1138 [id,id,inFun FinalizeWeakOp mkR mkM])) }
1139 has_side_effects = True
1143 ------------------------------------------------------------------------
1144 --- Stable pointers and names ---
1145 ------------------------------------------------------------------------
1147 primop MakeStablePtrOp "makeStablePtr#" GenPrimOp
1148 a -> State# RealWorld -> (# State# RealWorld, StablePtr# a #)
1150 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1151 usage = { mangle MakeStablePtrOp [mkM, mkP] mkM }
1152 has_side_effects = True
1154 primop DeRefStablePtrOp "deRefStablePtr#" GenPrimOp
1155 StablePtr# a -> State# RealWorld -> (# State# RealWorld, a #)
1157 usage = { mangle DeRefStablePtrOp [mkM, mkP] mkM }
1158 needs_wrapper = True
1159 has_side_effects = True
1161 primop EqStablePtrOp "eqStablePtr#" GenPrimOp
1162 StablePtr# a -> StablePtr# a -> Int#
1164 usage = { mangle EqStablePtrOp [mkP, mkP] mkR }
1165 has_side_effects = True
1167 primop MakeStableNameOp "makeStableName#" GenPrimOp
1168 a -> State# RealWorld -> (# State# RealWorld, StableName# a #)
1170 usage = { mangle MakeStableNameOp [mkZ, mkP] mkR }
1171 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1172 needs_wrapper = True
1173 has_side_effects = True
1176 primop EqStableNameOp "eqStableName#" GenPrimOp
1177 StableName# a -> StableName# a -> Int#
1179 usage = { mangle EqStableNameOp [mkP, mkP] mkR }
1181 primop StableNameToIntOp "stableNameToInt#" GenPrimOp
1182 StableName# a -> Int#
1184 usage = { mangle StableNameToIntOp [mkP] mkR }
1186 ------------------------------------------------------------------------
1187 --- Unsafe pointer equality (#1 Bad Guy: Alistair Reid :) ---
1188 ------------------------------------------------------------------------
1190 primop ReallyUnsafePtrEqualityOp "reallyUnsafePtrEquality#" GenPrimOp
1193 usage = { mangle ReallyUnsafePtrEqualityOp [mkZ, mkZ] mkR }
1195 ------------------------------------------------------------------------
1197 ------------------------------------------------------------------------
1199 primop SeqOp "seq#" GenPrimOp
1202 usage = { mangle SeqOp [mkO] mkR }
1203 strictness = { \ arity -> StrictnessInfo [wwStrict] False }
1204 -- Seq is strict in its argument; see notes in ConFold.lhs
1205 has_side_effects = True
1207 primop ParOp "par#" GenPrimOp
1210 usage = { mangle ParOp [mkO] mkR }
1211 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
1212 -- Note that Par is lazy to avoid that the sparked thing
1213 -- gets evaluted strictly, which it should *not* be
1214 has_side_effects = True
1216 -- HWL: The first 4 Int# in all par... annotations denote:
1217 -- name, granularity info, size of result, degree of parallelism
1218 -- Same structure as _seq_ i.e. returns Int#
1219 -- KSW: v, the second arg in parAt# and parAtForNow#, is used only to determine
1220 -- `the processor containing the expression v'; it is not evaluated
1222 primop ParGlobalOp "parGlobal#" GenPrimOp
1223 a -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1225 usage = { mangle ParGlobalOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1226 has_side_effects = True
1228 primop ParLocalOp "parLocal#" GenPrimOp
1229 a -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1231 usage = { mangle ParLocalOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1232 has_side_effects = True
1234 primop ParAtOp "parAt#" GenPrimOp
1235 b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int#
1237 usage = { mangle ParAtOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM }
1238 has_side_effects = True
1240 primop ParAtAbsOp "parAtAbs#" GenPrimOp
1241 a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1243 usage = { mangle ParAtAbsOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1244 has_side_effects = True
1246 primop ParAtRelOp "parAtRel#" GenPrimOp
1247 a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1249 usage = { mangle ParAtRelOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1250 has_side_effects = True
1252 primop ParAtForNowOp "parAtForNow#" GenPrimOp
1253 b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int#
1255 usage = { mangle ParAtForNowOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM }
1256 has_side_effects = True
1258 primop CopyableOp "copyable#" GenPrimOp
1261 usage = { mangle CopyableOp [mkZ] mkR }
1262 has_side_effects = True
1264 primop NoFollowOp "noFollow#" GenPrimOp
1267 usage = { mangle NoFollowOp [mkZ] mkR }
1268 has_side_effects = True
1271 ------------------------------------------------------------------------
1272 --- tag to enum stuff ---
1273 ------------------------------------------------------------------------
1275 primop DataToTagOp "dataToTag#" GenPrimOp
1278 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
1280 primop TagToEnumOp "tagToEnum#" GenPrimOp
1286 ------------------------------------------------------------------------
1288 ------------------------------------------------------------------------