1 -----------------------------------------------------------------------
2 -- $Id: primops.txt,v 1.12 2000/12/15 17:14:39 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 metacircular interpreter ---
47 ------------------------------------------------------------------------
49 primop IndexOffClosureOp_Ptr "indexPtrOffClosure#" GenPrimOp
51 primop IndexOffClosureOp_Word "indexWordOffClosure#" GenPrimOp
54 primop SetOffClosureOp_Ptr "setPtrOffClosure#" GenPrimOp
55 a -> Int# -> b -> (# a #)
56 with strictness = { \ arity -> StrictnessInfo [wwStrict, wwPrim, wwLazy] False }
58 primop SetOffClosureOp_Word "setWordOffClosure#" GenPrimOp
59 a -> Int# -> Word# -> (# a #)
60 with strictness = { \ arity -> StrictnessInfo [wwStrict, wwPrim, wwPrim] False }
62 ------------------------------------------------------------------------
64 ------------------------------------------------------------------------
66 primop AddrGtOp "gtAddr#" Compare Addr# -> Addr# -> Bool
67 primop AddrGeOp "geAddr#" Compare Addr# -> Addr# -> Bool
68 primop AddrEqOp "eqAddr#" Compare Addr# -> Addr# -> Bool
69 primop AddrNeOp "neAddr#" Compare Addr# -> Addr# -> Bool
70 primop AddrLtOp "ltAddr#" Compare Addr# -> Addr# -> Bool
71 primop AddrLeOp "leAddr#" Compare Addr# -> Addr# -> Bool
73 primop Addr2IntOp "addr2Int#" GenPrimOp Addr# -> Int#
76 ------------------------------------------------------------------------
78 ------------------------------------------------------------------------
80 primop CharGtOp "gtChar#" Compare Char# -> Char# -> Bool
81 primop CharGeOp "geChar#" Compare Char# -> Char# -> Bool
83 primop CharEqOp "eqChar#" Compare
84 Char# -> Char# -> Bool
85 with commutable = True
87 primop CharNeOp "neChar#" Compare
88 Char# -> Char# -> Bool
89 with commutable = True
91 primop CharLtOp "ltChar#" Compare Char# -> Char# -> Bool
92 primop CharLeOp "leChar#" Compare Char# -> Char# -> Bool
94 primop OrdOp "ord#" GenPrimOp Char# -> Int#
96 ------------------------------------------------------------------------
98 ------------------------------------------------------------------------
100 primop DoubleGtOp ">##" Compare Double# -> Double# -> Bool
101 primop DoubleGeOp ">=##" Compare Double# -> Double# -> Bool
103 primop DoubleEqOp "==##" Compare
104 Double# -> Double# -> Bool
105 with commutable = True
107 primop DoubleNeOp "/=##" Compare
108 Double# -> Double# -> Bool
109 with commutable = True
111 primop DoubleLtOp "<##" Compare Double# -> Double# -> Bool
112 primop DoubleLeOp "<=##" Compare Double# -> Double# -> Bool
114 primop DoubleAddOp "+##" Dyadic
115 Double# -> Double# -> Double#
116 with commutable = True
118 primop DoubleSubOp "-##" Dyadic Double# -> Double# -> Double#
120 primop DoubleMulOp "*##" Dyadic
121 Double# -> Double# -> Double#
122 with commutable = True
124 primop DoubleDivOp "/##" Dyadic
125 Double# -> Double# -> Double#
128 primop DoubleNegOp "negateDouble#" Monadic Double# -> Double#
130 primop Double2IntOp "double2Int#" GenPrimOp Double# -> Int#
131 primop Double2FloatOp "double2Float#" GenPrimOp Double# -> Float#
133 primop DoubleExpOp "expDouble#" Monadic
135 with needs_wrapper = True
137 primop DoubleLogOp "logDouble#" Monadic
143 primop DoubleSqrtOp "sqrtDouble#" Monadic
145 with needs_wrapper = True
147 primop DoubleSinOp "sinDouble#" Monadic
149 with needs_wrapper = True
151 primop DoubleCosOp "cosDouble#" Monadic
153 with needs_wrapper = True
155 primop DoubleTanOp "tanDouble#" Monadic
157 with needs_wrapper = True
159 primop DoubleAsinOp "asinDouble#" Monadic
165 primop DoubleAcosOp "acosDouble#" Monadic
171 primop DoubleAtanOp "atanDouble#" Monadic
176 primop DoubleSinhOp "sinhDouble#" Monadic
178 with needs_wrapper = True
180 primop DoubleCoshOp "coshDouble#" Monadic
182 with needs_wrapper = True
184 primop DoubleTanhOp "tanhDouble#" Monadic
186 with needs_wrapper = True
188 primop DoublePowerOp "**##" Dyadic
189 Double# -> Double# -> Double#
190 with needs_wrapper = True
192 primop DoubleDecodeOp "decodeDouble#" GenPrimOp
193 Double# -> (# Int#, Int#, ByteArr# #)
194 with out_of_line = True
196 ------------------------------------------------------------------------
198 ------------------------------------------------------------------------
200 primop FloatGtOp "gtFloat#" Compare Float# -> Float# -> Bool
201 primop FloatGeOp "geFloat#" Compare Float# -> Float# -> Bool
203 primop FloatEqOp "eqFloat#" Compare
204 Float# -> Float# -> Bool
205 with commutable = True
207 primop FloatNeOp "neFloat#" Compare
208 Float# -> Float# -> Bool
209 with commutable = True
211 primop FloatLtOp "ltFloat#" Compare Float# -> Float# -> Bool
212 primop FloatLeOp "leFloat#" Compare Float# -> Float# -> Bool
214 primop FloatAddOp "plusFloat#" Dyadic
215 Float# -> Float# -> Float#
216 with commutable = True
218 primop FloatSubOp "minusFloat#" Dyadic Float# -> Float# -> Float#
220 primop FloatMulOp "timesFloat#" Dyadic
221 Float# -> Float# -> Float#
222 with commutable = True
224 primop FloatDivOp "divideFloat#" Dyadic
225 Float# -> Float# -> Float#
228 primop FloatNegOp "negateFloat#" Monadic Float# -> Float#
230 primop Float2IntOp "float2Int#" GenPrimOp Float# -> Int#
232 primop FloatExpOp "expFloat#" Monadic
234 with needs_wrapper = True
236 primop FloatLogOp "logFloat#" Monadic
238 with needs_wrapper = True
241 primop FloatSqrtOp "sqrtFloat#" Monadic
243 with needs_wrapper = True
245 primop FloatSinOp "sinFloat#" Monadic
247 with needs_wrapper = True
249 primop FloatCosOp "cosFloat#" Monadic
251 with needs_wrapper = True
253 primop FloatTanOp "tanFloat#" Monadic
255 with needs_wrapper = True
257 primop FloatAsinOp "asinFloat#" Monadic
259 with needs_wrapper = True
262 primop FloatAcosOp "acosFloat#" Monadic
264 with needs_wrapper = True
267 primop FloatAtanOp "atanFloat#" Monadic
269 with needs_wrapper = True
271 primop FloatSinhOp "sinhFloat#" Monadic
273 with needs_wrapper = True
275 primop FloatCoshOp "coshFloat#" Monadic
277 with needs_wrapper = True
279 primop FloatTanhOp "tanhFloat#" Monadic
281 with needs_wrapper = True
283 primop FloatPowerOp "powerFloat#" Dyadic
284 Float# -> Float# -> Float#
285 with needs_wrapper = True
287 primop Float2DoubleOp "float2Double#" GenPrimOp Float# -> Double#
289 primop FloatDecodeOp "decodeFloat#" GenPrimOp
290 Float# -> (# Int#, Int#, ByteArr# #)
291 with out_of_line = True
293 ------------------------------------------------------------------------
295 ------------------------------------------------------------------------
297 primop IntAddOp "+#" Dyadic
299 with commutable = True
301 primop IntSubOp "-#" Dyadic Int# -> Int# -> Int#
304 Dyadic Int# -> Int# -> Int#
305 with commutable = True
307 primop IntQuotOp "quotInt#" Dyadic
311 primop IntRemOp "remInt#" Dyadic
315 primop IntGcdOp "gcdInt#" Dyadic Int# -> Int# -> Int#
316 primop IntNegOp "negateInt#" Monadic Int# -> Int#
317 primop IntAddCOp "addIntC#" GenPrimOp Int# -> Int# -> (# Int#, Int# #)
318 primop IntSubCOp "subIntC#" GenPrimOp Int# -> Int# -> (# Int#, Int# #)
319 primop IntMulCOp "mulIntC#" GenPrimOp Int# -> Int# -> (# Int#, Int# #)
320 primop IntGtOp ">#" Compare Int# -> Int# -> Bool
321 primop IntGeOp ">=#" Compare Int# -> Int# -> Bool
323 primop IntEqOp "==#" Compare
325 with commutable = True
327 primop IntNeOp "/=#" Compare
329 with commutable = True
331 primop IntLtOp "<#" Compare Int# -> Int# -> Bool
332 primop IntLeOp "<=#" Compare Int# -> Int# -> Bool
334 primop ChrOp "chr#" GenPrimOp Int# -> Char#
336 primop Int2WordOp "int2Word#" GenPrimOp Int# -> Word#
337 primop Int2AddrOp "int2Addr#"GenPrimOp Int# -> Addr#
338 primop Int2FloatOp "int2Float#" GenPrimOp Int# -> Float#
339 primop Int2DoubleOp "int2Double#" GenPrimOp Int# -> Double#
341 primop Int2IntegerOp "int2Integer#"
342 GenPrimOp Int# -> (# Int#, ByteArr# #)
343 with out_of_line = True
345 primop ISllOp "iShiftL#" GenPrimOp Int# -> Int# -> Int#
346 primop ISraOp "iShiftRA#" GenPrimOp Int# -> Int# -> Int#
347 primop ISrlOp "iShiftRL#" GenPrimOp Int# -> Int# -> Int#
349 ------------------------------------------------------------------------
351 ------------------------------------------------------------------------
353 primop Int64ToIntegerOp "int64ToInteger#" GenPrimOp
354 Int64# -> (# Int#, ByteArr# #)
355 with out_of_line = True
358 ------------------------------------------------------------------------
360 ------------------------------------------------------------------------
362 primop IntegerNegOp "negateInteger#" GenPrimOp
363 Int# -> ByteArr# -> (# Int#, ByteArr# #)
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_ForeignObj "readForeignObjOffAddr#" GenPrimOp
773 Addr# -> Int# -> State# s -> (# State# s, ForeignObj# #)
775 primop ReadOffAddrOp_Int8 "readInt8OffAddr#" GenPrimOp
776 Addr# -> Int# -> State# s -> (# State# s, Int# #)
778 primop ReadOffAddrOp_Word8 "readWord8OffAddr#" GenPrimOp
779 Addr# -> Int# -> State# s -> (# State# s, Word# #)
781 primop ReadOffAddrOp_Int16 "readInt16OffAddr#" GenPrimOp
782 Addr# -> Int# -> State# s -> (# State# s, Int# #)
784 primop ReadOffAddrOp_Word16 "readWord16OffAddr#" GenPrimOp
785 Addr# -> Int# -> State# s -> (# State# s, Word# #)
787 primop ReadOffAddrOp_Int32 "readInt32OffAddr#" GenPrimOp
788 Addr# -> Int# -> State# s -> (# State# s, Int# #)
790 primop ReadOffAddrOp_Word32 "readWord32OffAddr#" GenPrimOp
791 Addr# -> Int# -> State# s -> (# State# s, Word# #)
793 primop ReadOffAddrOp_Int64 "readInt64OffAddr#" GenPrimOp
794 Addr# -> Int# -> State# s -> (# State# s, Int64# #)
796 primop ReadOffAddrOp_Word64 "readWord64OffAddr#" GenPrimOp
797 Addr# -> Int# -> State# s -> (# State# s, Word64# #)
800 primop WriteOffAddrOp_Char "writeCharOffAddr#" GenPrimOp
801 Addr# -> Int# -> Char# -> State# s -> State# s
802 with has_side_effects = True
804 primop WriteOffAddrOp_Int "writeIntOffAddr#" GenPrimOp
805 Addr# -> Int# -> Int# -> State# s -> State# s
806 with has_side_effects = True
808 primop WriteOffAddrOp_Word "writeWordOffAddr#" GenPrimOp
809 Addr# -> Int# -> Word# -> State# s -> State# s
810 with has_side_effects = True
812 primop WriteOffAddrOp_Addr "writeAddrOffAddr#" GenPrimOp
813 Addr# -> Int# -> Addr# -> State# s -> State# s
814 with has_side_effects = True
816 primop WriteOffAddrOp_Float "writeFloatOffAddr#" GenPrimOp
817 Addr# -> Int# -> Float# -> State# s -> State# s
818 with has_side_effects = True
820 primop WriteOffAddrOp_Double "writeDoubleOffAddr#" GenPrimOp
821 Addr# -> Int# -> Double# -> State# s -> State# s
822 with has_side_effects = True
824 primop WriteOffAddrOp_StablePtr "writeStablePtrOffAddr#" GenPrimOp
825 Addr# -> Int# -> StablePtr# a -> State# s -> State# s
826 with has_side_effects = True
828 primop WriteOffAddrOp_ForeignObj "writeForeignObjOffAddr#" GenPrimOp
829 Addr# -> Int# -> ForeignObj# -> State# s -> State# s
830 with has_side_effects = True
832 primop WriteOffAddrOp_Int8 "writeInt8OffAddr#" GenPrimOp
833 Addr# -> Int# -> Int# -> State# s -> State# s
834 with has_side_effects = True
836 primop WriteOffAddrOp_Word8 "writeWord8OffAddr#" GenPrimOp
837 Addr# -> Int# -> Word# -> State# s -> State# s
838 with has_side_effects = True
840 primop WriteOffAddrOp_Int16 "writeInt16OffAddr#" GenPrimOp
841 Addr# -> Int# -> Int# -> State# s -> State# s
842 with has_side_effects = True
844 primop WriteOffAddrOp_Word16 "writeWord16OffAddr#" GenPrimOp
845 Addr# -> Int# -> Word# -> State# s -> State# s
846 with has_side_effects = True
848 primop WriteOffAddrOp_Int32 "writeInt32OffAddr#" GenPrimOp
849 Addr# -> Int# -> Int# -> State# s -> State# s
850 with has_side_effects = True
852 primop WriteOffAddrOp_Word32 "writeWord32OffAddr#" GenPrimOp
853 Addr# -> Int# -> Word# -> State# s -> State# s
854 with has_side_effects = True
856 primop WriteOffAddrOp_Int64 "writeInt64OffAddr#" GenPrimOp
857 Addr# -> Int# -> Int64# -> State# s -> State# s
858 with has_side_effects = True
860 primop WriteOffAddrOp_Word64 "writeWord64OffAddr#" GenPrimOp
861 Addr# -> Int# -> Word64# -> State# s -> State# s
862 with has_side_effects = True
866 primop NewArrayOp "newArray#" GenPrimOp
867 Int# -> a -> State# s -> (# State# s, MutArr# s a #)
869 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
870 usage = { mangle NewArrayOp [mkP, mkM, mkP] mkM }
873 primop SameMutableArrayOp "sameMutableArray#" GenPrimOp
874 MutArr# s a -> MutArr# s a -> Bool
876 usage = { mangle SameMutableArrayOp [mkP, mkP] mkM }
878 primop SameMutableByteArrayOp "sameMutableByteArray#" GenPrimOp
879 MutByteArr# s -> MutByteArr# s -> Bool
881 primop ReadArrayOp "readArray#" GenPrimOp
882 MutArr# s a -> Int# -> State# s -> (# State# s, a #)
884 usage = { mangle ReadArrayOp [mkM, mkP, mkP] mkM }
886 primop WriteArrayOp "writeArray#" GenPrimOp
887 MutArr# s a -> Int# -> a -> State# s -> State# s
889 usage = { mangle WriteArrayOp [mkM, mkP, mkM, mkP] mkR }
890 strictness = { \ arity -> StrictnessInfo [wwPrim, wwPrim, wwLazy, wwPrim] False }
891 has_side_effects = True
893 primop IndexArrayOp "indexArray#" GenPrimOp
894 Array# a -> Int# -> (# a #)
896 usage = { mangle IndexArrayOp [mkM, mkP] mkM }
898 primop UnsafeFreezeArrayOp "unsafeFreezeArray#" GenPrimOp
899 MutArr# s a -> State# s -> (# State# s, Array# a #)
901 usage = { mangle UnsafeFreezeArrayOp [mkM, mkP] mkM }
902 has_side_effects = True
904 primop UnsafeFreezeByteArrayOp "unsafeFreezeByteArray#" GenPrimOp
905 MutByteArr# s -> State# s -> (# State# s, ByteArr# #)
907 has_side_effects = True
909 primop UnsafeThawArrayOp "unsafeThawArray#" GenPrimOp
910 Array# a -> State# s -> (# State# s, MutArr# s a #)
912 usage = { mangle UnsafeThawArrayOp [mkM, mkP] mkM }
915 primop SizeofByteArrayOp "sizeofByteArray#" GenPrimOp
918 primop SizeofMutableByteArrayOp "sizeofMutableByteArray#" GenPrimOp
919 MutByteArr# s -> Int#
921 ------------------------------------------------------------------------
922 --- Mutable variables ---
923 ------------------------------------------------------------------------
925 primop NewMutVarOp "newMutVar#" GenPrimOp
926 a -> State# s -> (# State# s, MutVar# s a #)
928 usage = { mangle NewMutVarOp [mkM, mkP] mkM }
929 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
932 primop ReadMutVarOp "readMutVar#" GenPrimOp
933 MutVar# s a -> State# s -> (# State# s, a #)
935 usage = { mangle ReadMutVarOp [mkM, mkP] mkM }
937 primop WriteMutVarOp "writeMutVar#" GenPrimOp
938 MutVar# s a -> a -> State# s -> State# s
940 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
941 usage = { mangle WriteMutVarOp [mkM, mkM, mkP] mkR }
942 has_side_effects = True
944 primop SameMutVarOp "sameMutVar#" GenPrimOp
945 MutVar# s a -> MutVar# s a -> Bool
947 usage = { mangle SameMutVarOp [mkP, mkP] mkM }
949 ------------------------------------------------------------------------
951 ------------------------------------------------------------------------
953 primop CatchOp "catch#" GenPrimOp
954 (State# RealWorld -> (# State# RealWorld, a #) )
955 -> (b -> State# RealWorld -> (# State# RealWorld, a #) )
957 -> (# State# RealWorld, a #)
959 strictness = { \ arity -> StrictnessInfo [wwLazy, wwLazy, wwPrim] False }
960 -- Catch is actually strict in its first argument
961 -- but we don't want to tell the strictness
962 -- analyser about that!
963 usage = { mangle CatchOp [mkM, mkM . (inFun CatchOp mkM mkM), mkP] mkM }
964 -- [mkO, mkO . (inFun mkM mkO)] mkO
965 -- might use caught action multiply
968 primop RaiseOp "raise#" GenPrimOp
971 strictness = { \ arity -> StrictnessInfo [wwLazy] True }
972 -- NB: True => result is bottom
973 usage = { mangle RaiseOp [mkM] mkM }
976 primop BlockAsyncExceptionsOp "blockAsyncExceptions#" GenPrimOp
977 (State# RealWorld -> (# State# RealWorld, a #))
978 -> (State# RealWorld -> (# State# RealWorld, a #))
980 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
983 primop UnblockAsyncExceptionsOp "unblockAsyncExceptions#" GenPrimOp
984 (State# RealWorld -> (# State# RealWorld, a #))
985 -> (State# RealWorld -> (# State# RealWorld, a #))
987 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
990 ------------------------------------------------------------------------
991 --- MVars (not the same as mutable variables!) ---
992 ------------------------------------------------------------------------
994 primop NewMVarOp "newMVar#" GenPrimOp
995 State# s -> (# State# s, MVar# s a #)
997 usage = { mangle NewMVarOp [mkP] mkR }
1000 primop TakeMVarOp "takeMVar#" GenPrimOp
1001 MVar# s a -> State# s -> (# State# s, a #)
1003 usage = { mangle TakeMVarOp [mkM, mkP] mkM }
1004 has_side_effects = True
1007 primop PutMVarOp "putMVar#" GenPrimOp
1008 MVar# s a -> a -> State# s -> State# s
1010 strictness = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
1011 usage = { mangle PutMVarOp [mkM, mkM, mkP] mkR }
1012 has_side_effects = True
1015 primop SameMVarOp "sameMVar#" GenPrimOp
1016 MVar# s a -> MVar# s a -> Bool
1018 usage = { mangle SameMVarOp [mkP, mkP] mkM }
1020 primop TryTakeMVarOp "tryTakeMVar#" GenPrimOp
1021 MVar# s a -> State# s -> (# State# s, Int#, a #)
1023 usage = { mangle TryTakeMVarOp [mkM, mkP] mkM }
1024 has_side_effects = True
1027 primop IsEmptyMVarOp "isEmptyMVar#" GenPrimOp
1028 MVar# s a -> State# s -> (# State# s, Int# #)
1030 usage = { mangle IsEmptyMVarOp [mkP, mkP] mkM }
1033 ------------------------------------------------------------------------
1034 --- delay/wait operations ---
1035 ------------------------------------------------------------------------
1037 primop DelayOp "delay#" GenPrimOp
1038 Int# -> State# s -> State# s
1040 needs_wrapper = True
1041 has_side_effects = True
1044 primop WaitReadOp "waitRead#" GenPrimOp
1045 Int# -> State# s -> State# s
1047 needs_wrapper = True
1048 has_side_effects = True
1051 primop WaitWriteOp "waitWrite#" GenPrimOp
1052 Int# -> State# s -> State# s
1054 needs_wrapper = True
1055 has_side_effects = True
1058 ------------------------------------------------------------------------
1059 --- concurrency primitives ---
1060 ------------------------------------------------------------------------
1062 primop ForkOp "fork#" GenPrimOp
1063 a -> State# RealWorld -> (# State# RealWorld, ThreadId# #)
1065 usage = { mangle ForkOp [mkO, mkP] mkR }
1066 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1067 has_side_effects = True
1070 primop KillThreadOp "killThread#" GenPrimOp
1071 ThreadId# -> a -> State# RealWorld -> State# RealWorld
1073 usage = { mangle KillThreadOp [mkP, mkM, mkP] mkR }
1074 has_side_effects = True
1077 primop YieldOp "yield#" GenPrimOp
1078 State# RealWorld -> State# RealWorld
1080 has_side_effects = True
1083 primop MyThreadIdOp "myThreadId#" GenPrimOp
1084 State# RealWorld -> (# State# RealWorld, ThreadId# #)
1086 ------------------------------------------------------------------------
1087 --- foreign objects ---
1088 ------------------------------------------------------------------------
1090 primop MkForeignObjOp "mkForeignObj#" GenPrimOp
1091 Addr# -> State# RealWorld -> (# State# RealWorld, ForeignObj# #)
1093 has_side_effects = True
1096 primop WriteForeignObjOp "writeForeignObj#" GenPrimOp
1097 ForeignObj# -> Addr# -> State# s -> State# s
1099 has_side_effects = True
1101 primop ForeignObjToAddrOp "foreignObjToAddr#" GenPrimOp
1102 ForeignObj# -> Addr#
1104 primop TouchOp "touch#" GenPrimOp
1105 o -> State# RealWorld -> State# RealWorld
1107 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1109 ------------------------------------------------------------------------
1110 --- Bytecode objects ---
1111 ------------------------------------------------------------------------
1113 primop NewBCOOp "newBCO#" GenPrimOp
1114 ByteArr# -> ByteArr# -> Array# a -> ByteArr# -> State# s -> (# State# s, BCO# #)
1116 has_side_effects = True
1120 ------------------------------------------------------------------------
1121 --- Weak pointers ---
1122 ------------------------------------------------------------------------
1124 -- note that tyvar "o" denotes openAlphaTyVar
1126 primop MkWeakOp "mkWeak#" GenPrimOp
1127 o -> b -> c -> State# RealWorld -> (# State# RealWorld, Weak# b #)
1129 strictness = { \ arity -> StrictnessInfo [wwLazy, wwLazy, wwLazy, wwPrim] False }
1130 usage = { mangle MkWeakOp [mkZ, mkM, mkM, mkP] mkM }
1131 has_side_effects = True
1134 primop DeRefWeakOp "deRefWeak#" GenPrimOp
1135 Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, a #)
1137 usage = { mangle DeRefWeakOp [mkM, mkP] mkM }
1138 has_side_effects = True
1140 primop FinalizeWeakOp "finalizeWeak#" GenPrimOp
1141 Weak# a -> State# RealWorld -> (# State# RealWorld, Int#,
1142 (State# RealWorld -> (# State# RealWorld, Unit #)) #)
1144 usage = { mangle FinalizeWeakOp [mkM, mkP]
1145 (mkR . (inUB FinalizeWeakOp
1146 [id,id,inFun FinalizeWeakOp mkR mkM])) }
1147 has_side_effects = True
1151 ------------------------------------------------------------------------
1152 --- Stable pointers and names ---
1153 ------------------------------------------------------------------------
1155 primop MakeStablePtrOp "makeStablePtr#" GenPrimOp
1156 a -> State# RealWorld -> (# State# RealWorld, StablePtr# a #)
1158 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1159 usage = { mangle MakeStablePtrOp [mkM, mkP] mkM }
1160 has_side_effects = True
1162 primop DeRefStablePtrOp "deRefStablePtr#" GenPrimOp
1163 StablePtr# a -> State# RealWorld -> (# State# RealWorld, a #)
1165 usage = { mangle DeRefStablePtrOp [mkM, mkP] mkM }
1166 needs_wrapper = True
1167 has_side_effects = True
1169 primop EqStablePtrOp "eqStablePtr#" GenPrimOp
1170 StablePtr# a -> StablePtr# a -> Int#
1172 usage = { mangle EqStablePtrOp [mkP, mkP] mkR }
1173 has_side_effects = True
1175 primop MakeStableNameOp "makeStableName#" GenPrimOp
1176 a -> State# RealWorld -> (# State# RealWorld, StableName# a #)
1178 usage = { mangle MakeStableNameOp [mkZ, mkP] mkR }
1179 strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
1180 needs_wrapper = True
1181 has_side_effects = True
1184 primop EqStableNameOp "eqStableName#" GenPrimOp
1185 StableName# a -> StableName# a -> Int#
1187 usage = { mangle EqStableNameOp [mkP, mkP] mkR }
1189 primop StableNameToIntOp "stableNameToInt#" GenPrimOp
1190 StableName# a -> Int#
1192 usage = { mangle StableNameToIntOp [mkP] mkR }
1194 ------------------------------------------------------------------------
1195 --- Unsafe pointer equality (#1 Bad Guy: Alistair Reid :) ---
1196 ------------------------------------------------------------------------
1198 primop ReallyUnsafePtrEqualityOp "reallyUnsafePtrEquality#" GenPrimOp
1201 usage = { mangle ReallyUnsafePtrEqualityOp [mkZ, mkZ] mkR }
1203 ------------------------------------------------------------------------
1205 ------------------------------------------------------------------------
1207 primop SeqOp "seq#" GenPrimOp
1210 usage = { mangle SeqOp [mkO] mkR }
1211 strictness = { \ arity -> StrictnessInfo [wwStrict] False }
1212 -- Seq is strict in its argument; see notes in ConFold.lhs
1213 has_side_effects = True
1215 primop ParOp "par#" GenPrimOp
1218 usage = { mangle ParOp [mkO] mkR }
1219 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
1220 -- Note that Par is lazy to avoid that the sparked thing
1221 -- gets evaluted strictly, which it should *not* be
1222 has_side_effects = True
1224 -- HWL: The first 4 Int# in all par... annotations denote:
1225 -- name, granularity info, size of result, degree of parallelism
1226 -- Same structure as _seq_ i.e. returns Int#
1227 -- KSW: v, the second arg in parAt# and parAtForNow#, is used only to determine
1228 -- `the processor containing the expression v'; it is not evaluated
1230 primop ParGlobalOp "parGlobal#" GenPrimOp
1231 a -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1233 usage = { mangle ParGlobalOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1234 has_side_effects = True
1236 primop ParLocalOp "parLocal#" GenPrimOp
1237 a -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1239 usage = { mangle ParLocalOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1240 has_side_effects = True
1242 primop ParAtOp "parAt#" GenPrimOp
1243 b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int#
1245 usage = { mangle ParAtOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM }
1246 has_side_effects = True
1248 primop ParAtAbsOp "parAtAbs#" GenPrimOp
1249 a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1251 usage = { mangle ParAtAbsOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1252 has_side_effects = True
1254 primop ParAtRelOp "parAtRel#" GenPrimOp
1255 a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int#
1257 usage = { mangle ParAtRelOp [mkO, mkP, mkP, mkP, mkP, mkM] mkM }
1258 has_side_effects = True
1260 primop ParAtForNowOp "parAtForNow#" GenPrimOp
1261 b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int#
1263 usage = { mangle ParAtForNowOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM }
1264 has_side_effects = True
1266 primop CopyableOp "copyable#" GenPrimOp
1269 usage = { mangle CopyableOp [mkZ] mkR }
1270 has_side_effects = True
1272 primop NoFollowOp "noFollow#" GenPrimOp
1275 usage = { mangle NoFollowOp [mkZ] mkR }
1276 has_side_effects = True
1279 ------------------------------------------------------------------------
1280 --- tag to enum stuff ---
1281 ------------------------------------------------------------------------
1283 primop DataToTagOp "dataToTag#" GenPrimOp
1286 strictness = { \ arity -> StrictnessInfo [wwLazy] False }
1288 primop TagToEnumOp "tagToEnum#" GenPrimOp
1294 ------------------------------------------------------------------------
1296 ------------------------------------------------------------------------