ghc-prim-0.11.0: GHC primitives
Maintainerghc-devs@haskell.org
Stabilityinternal
Portabilitynon-portable (GHC extensions)
Safe HaskellUnsafe
LanguageHaskell2010

GHC.Prim

Description

GHC's primitive types and operations. Use GHC.Exts from the base package instead of importing this module directly.

Synopsis

Builtin syntax

data FUN Source #

The builtin function type, written in infix form as a % m -> b. Values of this type are functions taking inputs of type a and producing outputs of type b. The multiplicity of the input is m.

Note that FUN m a b permits representation polymorphism in both a and b, so that types like Int# -> Int# can still be well-kinded.

The word size story.

Haskell98 specifies that signed integers (type Int) must contain at least 30 bits. GHC always implements Int using the primitive type Int#, whose size equals the MachDeps.h constant WORD_SIZE_IN_BITS. This is normally set based on the config.h parameter SIZEOF_HSWORD, i.e., 32 bits on 32-bit machines, 64 bits on 64-bit machines.

GHC also implements a primitive unsigned integer type Word# which always has the same number of bits as Int#.

In addition, GHC supports families of explicit-sized integers and words at 8, 16, 32, and 64 bits, with the usual arithmetic operations, comparisons, and a range of conversions.

Finally, there are strongly deprecated primops for coercing between Addr#, the primitive type of machine addresses, and Int#. These are pretty bogus anyway, but will work on existing 32-bit and 64-bit GHC targets; they are completely bogus when tag bits are used in Int#, so are not available in this case.

Char#

Operations on 31-bit characters.

Int8#

Operations on 8-bit integers.

quotInt8# :: Int8# -> Int8# -> Int8# Source #

Warning: this can fail with an unchecked exception.

remInt8# :: Int8# -> Int8# -> Int8# Source #

Warning: this can fail with an unchecked exception.

quotRemInt8# :: Int8# -> Int8# -> (# Int8#, Int8# #) Source #

Warning: this can fail with an unchecked exception.

Word8#

Operations on 8-bit unsigned words.

quotWord8# :: Word8# -> Word8# -> Word8# Source #

Warning: this can fail with an unchecked exception.

remWord8# :: Word8# -> Word8# -> Word8# Source #

Warning: this can fail with an unchecked exception.

quotRemWord8# :: Word8# -> Word8# -> (# Word8#, Word8# #) Source #

Warning: this can fail with an unchecked exception.

Int16#

Operations on 16-bit integers.

quotInt16# :: Int16# -> Int16# -> Int16# Source #

Warning: this can fail with an unchecked exception.

remInt16# :: Int16# -> Int16# -> Int16# Source #

Warning: this can fail with an unchecked exception.

quotRemInt16# :: Int16# -> Int16# -> (# Int16#, Int16# #) Source #

Warning: this can fail with an unchecked exception.

Word16#

Operations on 16-bit unsigned words.

quotWord16# :: Word16# -> Word16# -> Word16# Source #

Warning: this can fail with an unchecked exception.

remWord16# :: Word16# -> Word16# -> Word16# Source #

Warning: this can fail with an unchecked exception.

quotRemWord16# :: Word16# -> Word16# -> (# Word16#, Word16# #) Source #

Warning: this can fail with an unchecked exception.

Int32#

Operations on 32-bit integers.

quotInt32# :: Int32# -> Int32# -> Int32# Source #

Warning: this can fail with an unchecked exception.

remInt32# :: Int32# -> Int32# -> Int32# Source #

Warning: this can fail with an unchecked exception.

quotRemInt32# :: Int32# -> Int32# -> (# Int32#, Int32# #) Source #

Warning: this can fail with an unchecked exception.

Word32#

Operations on 32-bit unsigned words.

quotWord32# :: Word32# -> Word32# -> Word32# Source #

Warning: this can fail with an unchecked exception.

remWord32# :: Word32# -> Word32# -> Word32# Source #

Warning: this can fail with an unchecked exception.

quotRemWord32# :: Word32# -> Word32# -> (# Word32#, Word32# #) Source #

Warning: this can fail with an unchecked exception.

Int64#

Operations on 64-bit signed words.

quotInt64# :: Int64# -> Int64# -> Int64# Source #

Warning: this can fail with an unchecked exception.

remInt64# :: Int64# -> Int64# -> Int64# Source #

Warning: this can fail with an unchecked exception.

Word64#

Operations on 64-bit unsigned words.

quotWord64# :: Word64# -> Word64# -> Word64# Source #

Warning: this can fail with an unchecked exception.

remWord64# :: Word64# -> Word64# -> Word64# Source #

Warning: this can fail with an unchecked exception.

Int#

Operations on native-size integers (32+ bits).

(+#) :: Int# -> Int# -> Int# infixl 6 Source #

(-#) :: Int# -> Int# -> Int# infixl 6 Source #

(*#) :: Int# -> Int# -> Int# infixl 7 Source #

Low word of signed integer multiply.

timesInt2# :: Int# -> Int# -> (# Int#, Int#, Int# #) Source #

Return a triple (isHighNeeded,high,low) where high and low are respectively the high and low bits of the double-word result. isHighNeeded is a cheap way to test if the high word is a sign-extension of the low word (isHighNeeded = 0#) or not (isHighNeeded = 1#).

mulIntMayOflo# :: Int# -> Int# -> Int# Source #

Return non-zero if there is any possibility that the upper word of a signed integer multiply might contain useful information. Return zero only if you are completely sure that no overflow can occur. On a 32-bit platform, the recommended implementation is to do a 32 x 32 -> 64 signed multiply, and subtract result[63:32] from (result[31] >>signed 31). If this is zero, meaning that the upper word is merely a sign extension of the lower one, no overflow can occur.

On a 64-bit platform it is not always possible to acquire the top 64 bits of the result. Therefore, a recommended implementation is to take the absolute value of both operands, and return 0 iff bits[63:31] of them are zero, since that means that their magnitudes fit within 31 bits, so the magnitude of the product must fit into 62 bits.

If in doubt, return non-zero, but do make an effort to create the correct answer for small args, since otherwise the performance of (*) :: Integer -> Integer -> Integer will be poor.

quotInt# :: Int# -> Int# -> Int# Source #

Rounds towards zero. The behavior is undefined if the second argument is zero.

Warning: this can fail with an unchecked exception.

remInt# :: Int# -> Int# -> Int# Source #

Satisfies (quotInt# x y) *# y +# (remInt# x y) == x. The behavior is undefined if the second argument is zero.

Warning: this can fail with an unchecked exception.

quotRemInt# :: Int# -> Int# -> (# Int#, Int# #) Source #

Rounds towards zero.

Warning: this can fail with an unchecked exception.

andI# :: Int# -> Int# -> Int# Source #

Bitwise "and".

orI# :: Int# -> Int# -> Int# Source #

Bitwise "or".

xorI# :: Int# -> Int# -> Int# Source #

Bitwise "xor".

notI# :: Int# -> Int# Source #

Bitwise "not", also known as the binary complement.

negateInt# :: Int# -> Int# Source #

Unary negation. Since the negative Int# range extends one further than the positive range, negateInt# of the most negative number is an identity operation. This way, negateInt# is always its own inverse.

addIntC# :: Int# -> Int# -> (# Int#, Int# #) Source #

Add signed integers reporting overflow. First member of result is the sum truncated to an Int#; second member is zero if the true sum fits in an Int#, nonzero if overflow occurred (the sum is either too large or too small to fit in an Int#).

subIntC# :: Int# -> Int# -> (# Int#, Int# #) Source #

Subtract signed integers reporting overflow. First member of result is the difference truncated to an Int#; second member is zero if the true difference fits in an Int#, nonzero if overflow occurred (the difference is either too large or too small to fit in an Int#).

(>#) :: Int# -> Int# -> Int# infix 4 Source #

(>=#) :: Int# -> Int# -> Int# infix 4 Source #

(==#) :: Int# -> Int# -> Int# infix 4 Source #

(/=#) :: Int# -> Int# -> Int# infix 4 Source #

(<#) :: Int# -> Int# -> Int# infix 4 Source #

(<=#) :: Int# -> Int# -> Int# infix 4 Source #

int2Float# :: Int# -> Float# Source #

Convert an Int# to the corresponding Float# with the same integral value (up to truncation due to floating-point precision). e.g. int2Float# 1# == 1.0#

int2Double# :: Int# -> Double# Source #

Convert an Int# to the corresponding Double# with the same integral value (up to truncation due to floating-point precision). e.g. int2Double# 1# == 1.0##

word2Float# :: Word# -> Float# Source #

Convert an Word# to the corresponding Float# with the same integral value (up to truncation due to floating-point precision). e.g. word2Float# 1## == 1.0#

word2Double# :: Word# -> Double# Source #

Convert an Word# to the corresponding Double# with the same integral value (up to truncation due to floating-point precision). e.g. word2Double# 1## == 1.0##

uncheckedIShiftL# :: Int# -> Int# -> Int# Source #

Shift left. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive.

uncheckedIShiftRA# :: Int# -> Int# -> Int# Source #

Shift right arithmetic. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive.

uncheckedIShiftRL# :: Int# -> Int# -> Int# Source #

Shift right logical. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive.

Word#

Operations on native-sized unsigned words (32+ bits).

addWordC# :: Word# -> Word# -> (# Word#, Int# #) Source #

Add unsigned integers reporting overflow. The first element of the pair is the result. The second element is the carry flag, which is nonzero on overflow. See also plusWord2#.

subWordC# :: Word# -> Word# -> (# Word#, Int# #) Source #

Subtract unsigned integers reporting overflow. The first element of the pair is the result. The second element is the carry flag, which is nonzero on overflow.

plusWord2# :: Word# -> Word# -> (# Word#, Word# #) Source #

Add unsigned integers, with the high part (carry) in the first component of the returned pair and the low part in the second component of the pair. See also addWordC#.

quotWord# :: Word# -> Word# -> Word# Source #

Warning: this can fail with an unchecked exception.

remWord# :: Word# -> Word# -> Word# Source #

Warning: this can fail with an unchecked exception.

quotRemWord# :: Word# -> Word# -> (# Word#, Word# #) Source #

Warning: this can fail with an unchecked exception.

quotRemWord2# :: Word# -> Word# -> Word# -> (# Word#, Word# #) Source #

Takes high word of dividend, then low word of dividend, then divisor. Requires that high word < divisor.

Warning: this can fail with an unchecked exception.

uncheckedShiftL# :: Word# -> Int# -> Word# Source #

Shift left logical. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive.

uncheckedShiftRL# :: Word# -> Int# -> Word# Source #

Shift right logical. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive.

popCnt8# :: Word# -> Word# Source #

Count the number of set bits in the lower 8 bits of a word.

popCnt16# :: Word# -> Word# Source #

Count the number of set bits in the lower 16 bits of a word.

popCnt32# :: Word# -> Word# Source #

Count the number of set bits in the lower 32 bits of a word.

popCnt64# :: Word64# -> Word# Source #

Count the number of set bits in a 64-bit word.

popCnt# :: Word# -> Word# Source #

Count the number of set bits in a word.

pdep8# :: Word# -> Word# -> Word# Source #

Deposit bits to lower 8 bits of a word at locations specified by a mask.

Since: ghc-prim-0.5.2.0

pdep16# :: Word# -> Word# -> Word# Source #

Deposit bits to lower 16 bits of a word at locations specified by a mask.

Since: ghc-prim-0.5.2.0

pdep32# :: Word# -> Word# -> Word# Source #

Deposit bits to lower 32 bits of a word at locations specified by a mask.

Since: ghc-prim-0.5.2.0

pdep64# :: Word64# -> Word64# -> Word64# Source #

Deposit bits to a word at locations specified by a mask.

Since: ghc-prim-0.5.2.0

pdep# :: Word# -> Word# -> Word# Source #

Deposit bits to a word at locations specified by a mask, aka parallel bit deposit.

Software emulation:

pdep :: Word -> Word -> Word
pdep src mask = go 0 src mask
  where
    go :: Word -> Word -> Word -> Word
    go result _ 0 = result
    go result src mask = go newResult newSrc newMask
      where
        maskCtz   = countTrailingZeros mask
        newResult = if testBit src 0 then setBit result maskCtz else result
        newSrc    = src `shiftR` 1
        newMask   = clearBit mask maskCtz

Since: ghc-prim-0.5.2.0

pext8# :: Word# -> Word# -> Word# Source #

Extract bits from lower 8 bits of a word at locations specified by a mask.

Since: ghc-prim-0.5.2.0

pext16# :: Word# -> Word# -> Word# Source #

Extract bits from lower 16 bits of a word at locations specified by a mask.

Since: ghc-prim-0.5.2.0

pext32# :: Word# -> Word# -> Word# Source #

Extract bits from lower 32 bits of a word at locations specified by a mask.

Since: ghc-prim-0.5.2.0

pext64# :: Word64# -> Word64# -> Word64# Source #

Extract bits from a word at locations specified by a mask.

Since: ghc-prim-0.5.2.0

pext# :: Word# -> Word# -> Word# Source #

Extract bits from a word at locations specified by a mask, aka parallel bit extract.

Software emulation:

pext :: Word -> Word -> Word
pext src mask = loop 0 0 0
  where
    loop i count result
      | i >= finiteBitSize (0 :: Word)
      = result
      | testBit mask i
      = loop (i + 1) (count + 1) (if testBit src i then setBit result count else result)
      | otherwise
      = loop (i + 1) count result

Since: ghc-prim-0.5.2.0

clz8# :: Word# -> Word# Source #

Count leading zeros in the lower 8 bits of a word.

clz16# :: Word# -> Word# Source #

Count leading zeros in the lower 16 bits of a word.

clz32# :: Word# -> Word# Source #

Count leading zeros in the lower 32 bits of a word.

clz64# :: Word64# -> Word# Source #

Count leading zeros in a 64-bit word.

clz# :: Word# -> Word# Source #

Count leading zeros in a word.

ctz8# :: Word# -> Word# Source #

Count trailing zeros in the lower 8 bits of a word.

ctz16# :: Word# -> Word# Source #

Count trailing zeros in the lower 16 bits of a word.

ctz32# :: Word# -> Word# Source #

Count trailing zeros in the lower 32 bits of a word.

ctz64# :: Word64# -> Word# Source #

Count trailing zeros in a 64-bit word.

ctz# :: Word# -> Word# Source #

Count trailing zeros in a word.

byteSwap16# :: Word# -> Word# Source #

Swap bytes in the lower 16 bits of a word. The higher bytes are undefined.

byteSwap32# :: Word# -> Word# Source #

Swap bytes in the lower 32 bits of a word. The higher bytes are undefined.

byteSwap64# :: Word64# -> Word64# Source #

Swap bytes in a 64 bits of a word.

byteSwap# :: Word# -> Word# Source #

Swap bytes in a word.

bitReverse8# :: Word# -> Word# Source #

Reverse the order of the bits in a 8-bit word.

bitReverse16# :: Word# -> Word# Source #

Reverse the order of the bits in a 16-bit word.

bitReverse32# :: Word# -> Word# Source #

Reverse the order of the bits in a 32-bit word.

bitReverse64# :: Word64# -> Word64# Source #

Reverse the order of the bits in a 64-bit word.

bitReverse# :: Word# -> Word# Source #

Reverse the order of the bits in a word.

Narrowings

Explicit narrowing of native-sized ints or words.

Double#

Operations on double-precision (64 bit) floating-point numbers.

(>##) :: Double# -> Double# -> Int# infix 4 Source #

(>=##) :: Double# -> Double# -> Int# infix 4 Source #

(==##) :: Double# -> Double# -> Int# infix 4 Source #

(/=##) :: Double# -> Double# -> Int# infix 4 Source #

(<##) :: Double# -> Double# -> Int# infix 4 Source #

(<=##) :: Double# -> Double# -> Int# infix 4 Source #

(+##) :: Double# -> Double# -> Double# infixl 6 Source #

(-##) :: Double# -> Double# -> Double# infixl 6 Source #

(*##) :: Double# -> Double# -> Double# infixl 7 Source #

(/##) :: Double# -> Double# -> Double# infixl 7 Source #

Warning: this can fail with an unchecked exception.

double2Int# :: Double# -> Int# Source #

Truncates a Double# value to the nearest Int#. Results are undefined if the truncation if truncation yields a value outside the range of Int#.

logDouble# :: Double# -> Double# Source #

Warning: this can fail with an unchecked exception.

log1pDouble# :: Double# -> Double# Source #

Warning: this can fail with an unchecked exception.

asinDouble# :: Double# -> Double# Source #

Warning: this can fail with an unchecked exception.

acosDouble# :: Double# -> Double# Source #

Warning: this can fail with an unchecked exception.

(**##) :: Double# -> Double# -> Double# Source #

Exponentiation.

decodeDouble_2Int# :: Double# -> (# Int#, Word#, Word#, Int# #) Source #

Convert to integer. First component of the result is -1 or 1, indicating the sign of the mantissa. The next two are the high and low 32 bits of the mantissa respectively, and the last is the exponent.

decodeDouble_Int64# :: Double# -> (# Int64#, Int# #) Source #

Decode Double# into mantissa and base-2 exponent.

Float#

Operations on single-precision (32-bit) floating-point numbers.

divideFloat# :: Float# -> Float# -> Float# Source #

Warning: this can fail with an unchecked exception.

float2Int# :: Float# -> Int# Source #

Truncates a Float# value to the nearest Int#. Results are undefined if the truncation if truncation yields a value outside the range of Int#.

logFloat# :: Float# -> Float# Source #

Warning: this can fail with an unchecked exception.

log1pFloat# :: Float# -> Float# Source #

Warning: this can fail with an unchecked exception.

asinFloat# :: Float# -> Float# Source #

Warning: this can fail with an unchecked exception.

acosFloat# :: Float# -> Float# Source #

Warning: this can fail with an unchecked exception.

decodeFloat_Int# :: Float# -> (# Int#, Int# #) Source #

Convert to integers. First Int# in result is the mantissa; second is the exponent.

Fused multiply-add operations

The fused multiply-add primops fmaddFloat# and fmaddDouble# implement the operation

\[ \lambda\ x\ y\ z \rightarrow x * y + z \]

with a single floating-point rounding operation at the end, as opposed to rounding twice (which can accumulate rounding errors).

These primops can be compiled directly to a single machine instruction on architectures that support them. Currently, these are:

  1. x86 with CPUs that support the FMA3 extended instruction set (which includes most processors since 2013).
  2. PowerPC.
  3. AArch64.

This requires users pass the '-mfma' flag to GHC. Otherwise, the primop is implemented by falling back to the C standard library, which might perform software emulation (this may yield results that are not IEEE compliant on some platforms).

The additional operations fmsubFloat#/fmsubDouble#, fnmaddFloat#fnmaddDouble# and fnmsubFloat#fnmsubDouble# provide variants on fmaddFloat#/fmaddDouble# in which some signs are changed:

\[ \begin{aligned} \mathrm{fmadd}\ x\ y\ z &= \phantom{+} x * y + z \\[8pt] \mathrm{fmsub}\ x\ y\ z &= \phantom{+} x * y - z \\[8pt] \mathrm{fnmadd}\ x\ y\ z &= - x * y + z \\[8pt] \mathrm{fnmsub}\ x\ y\ z &= - x * y - z \end{aligned} \]

fmaddFloat# :: Float# -> Float# -> Float# -> Float# Source #

Fused multiply-add operation x*y+z. See GHC.Prim.

fmsubFloat# :: Float# -> Float# -> Float# -> Float# Source #

Fused multiply-subtract operation x*y-z. See GHC.Prim.

fnmaddFloat# :: Float# -> Float# -> Float# -> Float# Source #

Fused negate-multiply-add operation -x*y+z. See GHC.Prim.

fnmsubFloat# :: Float# -> Float# -> Float# -> Float# Source #

Fused negate-multiply-subtract operation -x*y-z. See GHC.Prim.

fmaddDouble# :: Double# -> Double# -> Double# -> Double# Source #

Fused multiply-add operation x*y+z. See GHC.Prim.

fmsubDouble# :: Double# -> Double# -> Double# -> Double# Source #

Fused multiply-subtract operation x*y-z. See GHC.Prim.

fnmaddDouble# :: Double# -> Double# -> Double# -> Double# Source #

Fused negate-multiply-add operation -x*y+z. See GHC.Prim.

fnmsubDouble# :: Double# -> Double# -> Double# -> Double# Source #

Fused negate-multiply-subtract operation -x*y-z. See GHC.Prim.

Arrays

Operations on Array#.

data Array# (a :: TYPE ('BoxedRep l)) :: UnliftedType Source #

newArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. Int# -> a -> State# d -> (# State# d, MutableArray# d a #) Source #

Create a new mutable array with the specified number of elements, in the specified state thread, with each element containing the specified initial value.

readArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutableArray# d a -> Int# -> State# d -> (# State# d, a #) Source #

Read from specified index of mutable array. Result is not yet evaluated.

Warning: this can fail with an unchecked exception.

writeArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutableArray# d a -> Int# -> a -> State# d -> State# d Source #

Write to specified index of mutable array.

Warning: this can fail with an unchecked exception.

sizeofArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). Array# a -> Int# Source #

Return the number of elements in the array.

sizeofMutableArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutableArray# d a -> Int# Source #

Return the number of elements in the array.

indexArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). Array# a -> Int# -> (# a #) Source #

Read from the specified index of an immutable array. The result is packaged into an unboxed unary tuple; the result itself is not yet evaluated. Pattern matching on the tuple forces the indexing of the array to happen but does not evaluate the element itself. Evaluating the thunk prevents additional thunks from building up on the heap. Avoiding these thunks, in turn, reduces references to the argument array, allowing it to be garbage collected more promptly.

Warning: this can fail with an unchecked exception.

unsafeFreezeArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutableArray# d a -> State# d -> (# State# d, Array# a #) Source #

Make a mutable array immutable, without copying.

unsafeThawArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. Array# a -> State# d -> (# State# d, MutableArray# d a #) Source #

Make an immutable array mutable, without copying.

copyArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. Array# a -> Int# -> MutableArray# d a -> Int# -> Int# -> State# d -> State# d Source #

Given a source array, an offset into the source array, a destination array, an offset into the destination array, and a number of elements to copy, copy the elements from the source array to the destination array. Both arrays must fully contain the specified ranges, but this is not checked. The two arrays must not be the same array in different states, but this is not checked either.

Warning: this can fail with an unchecked exception.

copyMutableArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutableArray# d a -> Int# -> MutableArray# d a -> Int# -> Int# -> State# d -> State# d Source #

Given a source array, an offset into the source array, a destination array, an offset into the destination array, and a number of elements to copy, copy the elements from the source array to the destination array. Both arrays must fully contain the specified ranges, but this is not checked. In the case where the source and destination are the same array the source and destination regions may overlap.

Warning: this can fail with an unchecked exception.

cloneArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). Array# a -> Int# -> Int# -> Array# a Source #

Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.

Warning: this can fail with an unchecked exception.

cloneMutableArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutableArray# d a -> Int# -> Int# -> State# d -> (# State# d, MutableArray# d a #) Source #

Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.

Warning: this can fail with an unchecked exception.

freezeArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutableArray# d a -> Int# -> Int# -> State# d -> (# State# d, Array# a #) Source #

Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.

Warning: this can fail with an unchecked exception.

thawArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. Array# a -> Int# -> Int# -> State# d -> (# State# d, MutableArray# d a #) Source #

Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.

Warning: this can fail with an unchecked exception.

casArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutableArray# d a -> Int# -> a -> a -> State# d -> (# State# d, Int#, a #) Source #

Given an array, an offset, the expected old value, and the new value, perform an atomic compare and swap (i.e. write the new value if the current value and the old value are the same pointer). Returns 0 if the swap succeeds and 1 if it fails. Additionally, returns the element at the offset after the operation completes. This means that on a success the new value is returned, and on a failure the actual old value (not the expected one) is returned. Implies a full memory barrier. The use of a pointer equality on a boxed value makes this function harder to use correctly than casIntArray#. All of the difficulties of using reallyUnsafePtrEquality# correctly apply to casArray# as well.

Warning: this can fail with an unchecked exception.

Small Arrays

Operations on SmallArray#. A SmallArray# works just like an Array#, but with different space use and performance characteristics (that are often useful with small arrays). The SmallArray# and SmallMutableArray# lack a `card table'. The purpose of a card table is to avoid having to scan every element of the array on each GC by keeping track of which elements have changed since the last GC and only scanning those that have changed. So the consequence of there being no card table is that the representation is somewhat smaller and the writes are somewhat faster (because the card table does not need to be updated). The disadvantage of course is that for a SmallMutableArray# the whole array has to be scanned on each GC. Thus it is best suited for use cases where the mutable array is not long lived, e.g. where a mutable array is initialised quickly and then frozen to become an immutable SmallArray#.

newSmallArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. Int# -> a -> State# d -> (# State# d, SmallMutableArray# d a #) Source #

Create a new mutable array with the specified number of elements, in the specified state thread, with each element containing the specified initial value.

shrinkSmallMutableArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). SmallMutableArray# d a -> Int# -> State# d -> State# d Source #

Shrink mutable array to new specified size, in the specified state thread. The new size argument must be less than or equal to the current size as reported by getSizeofSmallMutableArray#.

Assuming the non-profiling RTS, for the copying garbage collector (default) this primitive compiles to an O(1) operation in C--, modifying the array in-place. For the non-moving garbage collector, however, the time is proportional to the number of elements shrinked out. Backends bypassing C-- representation (such as JavaScript) might behave differently.

Since: ghc-prim-0.6.1

readSmallArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). SmallMutableArray# d a -> Int# -> State# d -> (# State# d, a #) Source #

Read from specified index of mutable array. Result is not yet evaluated.

Warning: this can fail with an unchecked exception.

writeSmallArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). SmallMutableArray# d a -> Int# -> a -> State# d -> State# d Source #

Write to specified index of mutable array.

Warning: this can fail with an unchecked exception.

sizeofSmallArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). SmallArray# a -> Int# Source #

Return the number of elements in the array.

sizeofSmallMutableArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). SmallMutableArray# d a -> Int# Source #

Deprecated: Use getSizeofSmallMutableArray# instead

Return the number of elements in the array. Deprecated, it is unsafe in the presence of shrinkSmallMutableArray# and resizeSmallMutableArray# operations on the same small mutable array.

getSizeofSmallMutableArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). SmallMutableArray# d a -> State# d -> (# State# d, Int# #) Source #

Return the number of elements in the array, correctly accounting for the effect of shrinkSmallMutableArray# and resizeSmallMutableArray#.

Since: ghc-prim-0.6.1

indexSmallArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). SmallArray# a -> Int# -> (# a #) Source #

Read from specified index of immutable array. Result is packaged into an unboxed singleton; the result itself is not yet evaluated.

Warning: this can fail with an unchecked exception.

unsafeFreezeSmallArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). SmallMutableArray# d a -> State# d -> (# State# d, SmallArray# a #) Source #

Make a mutable array immutable, without copying.

unsafeThawSmallArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. SmallArray# a -> State# d -> (# State# d, SmallMutableArray# d a #) Source #

Make an immutable array mutable, without copying.

copySmallArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. SmallArray# a -> Int# -> SmallMutableArray# d a -> Int# -> Int# -> State# d -> State# d Source #

Given a source array, an offset into the source array, a destination array, an offset into the destination array, and a number of elements to copy, copy the elements from the source array to the destination array. Both arrays must fully contain the specified ranges, but this is not checked. The two arrays must not be the same array in different states, but this is not checked either.

Warning: this can fail with an unchecked exception.

copySmallMutableArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). SmallMutableArray# d a -> Int# -> SmallMutableArray# d a -> Int# -> Int# -> State# d -> State# d Source #

Given a source array, an offset into the source array, a destination array, an offset into the destination array, and a number of elements to copy, copy the elements from the source array to the destination array. The source and destination arrays can refer to the same array. Both arrays must fully contain the specified ranges, but this is not checked. The regions are allowed to overlap, although this is only possible when the same array is provided as both the source and the destination.

Warning: this can fail with an unchecked exception.

cloneSmallArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). SmallArray# a -> Int# -> Int# -> SmallArray# a Source #

Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.

Warning: this can fail with an unchecked exception.

cloneSmallMutableArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). SmallMutableArray# d a -> Int# -> Int# -> State# d -> (# State# d, SmallMutableArray# d a #) Source #

Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.

Warning: this can fail with an unchecked exception.

freezeSmallArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). SmallMutableArray# d a -> Int# -> Int# -> State# d -> (# State# d, SmallArray# a #) Source #

Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.

Warning: this can fail with an unchecked exception.

thawSmallArray# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. SmallArray# a -> Int# -> Int# -> State# d -> (# State# d, SmallMutableArray# d a #) Source #

Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.

Warning: this can fail with an unchecked exception.

casSmallArray# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). SmallMutableArray# d a -> Int# -> a -> a -> State# d -> (# State# d, Int#, a #) Source #

Unsafe, machine-level atomic compare and swap on an element within an array. See the documentation of casArray#.

Warning: this can fail with an unchecked exception.

Byte Arrays

A ByteArray# is a region of raw memory in the garbage-collected heap, which is not scanned for pointers. There are three sets of operations for accessing byte array contents: index for reading from immutable byte arrays, and read/write for mutable byte arrays. Each set contains operations for a range of useful primitive data types. Each operation takes an offset measured in terms of the size of the primitive type being read or written.

data ByteArray# :: UnliftedType Source #

A boxed, unlifted datatype representing a region of raw memory in the garbage-collected heap, which is not scanned for pointers during garbage collection.

It is created by freezing a MutableByteArray# with unsafeFreezeByteArray#. Freezing is essentially a no-op, as MutableByteArray# and ByteArray# share the same heap structure under the hood.

The immutable and mutable variants are commonly used for scenarios requiring high-performance data structures, like Text, Primitive Vector, Unboxed Array, and ShortByteString.

Another application of fundamental importance is Integer, which is backed by ByteArray#.

The representation on the heap of a Byte Array is:

+------------+-----------------+-----------------------+
|            |                 |                       |
|   HEADER   | SIZE (in bytes) |       PAYLOAD         |
|            |                 |                       |
+------------+-----------------+-----------------------+

To obtain a pointer to actual payload (e.g., for FFI purposes) use byteArrayContents# or mutableByteArrayContents#.

Alternatively, enabling the UnliftedFFITypes extension allows to mention ByteArray# and MutableByteArray# in FFI type signatures directly.

data MutableByteArray# a :: UnliftedType Source #

A mutable ByteAray#. It can be created in three ways:

Unpinned arrays can be moved around during garbage collection, so you must not store or pass pointers to these values if there is a chance for the garbage collector to kick in. That said, even unpinned arrays can be passed to unsafe FFI calls, because no garbage collection happens during these unsafe calls (see Guaranteed Call Safety in the GHC Manual). For safe FFI calls, byte arrays must be not only pinned, but also kept alive by means of the keepAlive# function for the duration of a call (that's because garbage collection cannot move a pinned array, but is free to scrap it altogether).

newByteArray# :: Int# -> State# d -> (# State# d, MutableByteArray# d #) Source #

Create a new mutable byte array of specified size (in bytes), in the specified state thread. The size of the memory underlying the array will be rounded up to the platform's word size.

newPinnedByteArray# :: Int# -> State# d -> (# State# d, MutableByteArray# d #) Source #

Like newByteArray# but GC guarantees not to move it.

newAlignedPinnedByteArray# :: Int# -> Int# -> State# d -> (# State# d, MutableByteArray# d #) Source #

Like newPinnedByteArray# but allow specifying an arbitrary alignment, which must be a power of two.

isMutableByteArrayPinned# :: MutableByteArray# d -> Int# Source #

Determine whether a MutableByteArray# is guaranteed not to move during GC.

isByteArrayPinned# :: ByteArray# -> Int# Source #

Determine whether a ByteArray# is guaranteed not to move during GC.

byteArrayContents# :: ByteArray# -> Addr# Source #

Intended for use with pinned arrays; otherwise very unsafe!

mutableByteArrayContents# :: MutableByteArray# d -> Addr# Source #

Intended for use with pinned arrays; otherwise very unsafe!

shrinkMutableByteArray# :: MutableByteArray# d -> Int# -> State# d -> State# d Source #

Shrink mutable byte array to new specified size (in bytes), in the specified state thread. The new size argument must be less than or equal to the current size as reported by getSizeofMutableByteArray#.

Assuming the non-profiling RTS, this primitive compiles to an O(1) operation in C--, modifying the array in-place. Backends bypassing C-- representation (such as JavaScript) might behave differently.

Since: ghc-prim-0.4.0.0

resizeMutableByteArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, MutableByteArray# d #) Source #

Resize mutable byte array to new specified size (in bytes), shrinking or growing it. The returned MutableByteArray# is either the original MutableByteArray# resized in-place or, if not possible, a newly allocated (unpinned) MutableByteArray# (with the original content copied over).

To avoid undefined behaviour, the original MutableByteArray# shall not be accessed anymore after a resizeMutableByteArray# has been performed. Moreover, no reference to the old one should be kept in order to allow garbage collection of the original MutableByteArray# in case a new MutableByteArray# had to be allocated.

Since: ghc-prim-0.4.0.0

unsafeFreezeByteArray# :: MutableByteArray# d -> State# d -> (# State# d, ByteArray# #) Source #

Make a mutable byte array immutable, without copying.

sizeofByteArray# :: ByteArray# -> Int# Source #

Return the size of the array in bytes.

sizeofMutableByteArray# :: MutableByteArray# d -> Int# Source #

Deprecated: Use getSizeofMutableByteArray# instead

Return the size of the array in bytes. Deprecated, it is unsafe in the presence of shrinkMutableByteArray# and resizeMutableByteArray# operations on the same mutable byte array.

getSizeofMutableByteArray# :: MutableByteArray# d -> State# d -> (# State# d, Int# #) Source #

Return the number of elements in the array, correctly accounting for the effect of shrinkMutableByteArray# and resizeMutableByteArray#.

Since: ghc-prim-0.5.0.0

indexCharArray# :: ByteArray# -> Int# -> Char# Source #

Read an 8-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWideCharArray# :: ByteArray# -> Int# -> Char# Source #

Read a 32-bit character; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

indexIntArray# :: ByteArray# -> Int# -> Int# Source #

Read a word-sized integer; offset in machine words.

Warning: this can fail with an unchecked exception.

indexWordArray# :: ByteArray# -> Int# -> Word# Source #

Read a word-sized unsigned integer; offset in machine words.

Warning: this can fail with an unchecked exception.

indexAddrArray# :: ByteArray# -> Int# -> Addr# Source #

Read a machine address; offset in machine words.

Warning: this can fail with an unchecked exception.

indexFloatArray# :: ByteArray# -> Int# -> Float# Source #

Read a single-precision floating-point value; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

indexDoubleArray# :: ByteArray# -> Int# -> Double# Source #

Read a double-precision floating-point value; offset in 8-byte words.

Warning: this can fail with an unchecked exception.

indexStablePtrArray# :: ByteArray# -> Int# -> StablePtr# a Source #

Read a StablePtr# value; offset in machine words.

Warning: this can fail with an unchecked exception.

indexInt8Array# :: ByteArray# -> Int# -> Int8# Source #

Read an 8-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8Array# :: ByteArray# -> Int# -> Word8# Source #

Read an 8-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexInt16Array# :: ByteArray# -> Int# -> Int16# Source #

Read a 16-bit signed integer; offset in 2-byte words.

Warning: this can fail with an unchecked exception.

indexWord16Array# :: ByteArray# -> Int# -> Word16# Source #

Read a 16-bit unsigned integer; offset in 2-byte words.

Warning: this can fail with an unchecked exception.

indexInt32Array# :: ByteArray# -> Int# -> Int32# Source #

Read a 32-bit signed integer; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

indexWord32Array# :: ByteArray# -> Int# -> Word32# Source #

Read a 32-bit unsigned integer; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

indexInt64Array# :: ByteArray# -> Int# -> Int64# Source #

Read a 64-bit signed integer; offset in 8-byte words.

Warning: this can fail with an unchecked exception.

indexWord64Array# :: ByteArray# -> Int# -> Word64# Source #

Read a 64-bit unsigned integer; offset in 8-byte words.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsChar# :: ByteArray# -> Int# -> Char# Source #

Read an 8-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsWideChar# :: ByteArray# -> Int# -> Char# Source #

Read a 32-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsInt# :: ByteArray# -> Int# -> Int# Source #

Read a word-sized integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsWord# :: ByteArray# -> Int# -> Word# Source #

Read a word-sized unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsAddr# :: ByteArray# -> Int# -> Addr# Source #

Read a machine address; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsFloat# :: ByteArray# -> Int# -> Float# Source #

Read a single-precision floating-point value; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsDouble# :: ByteArray# -> Int# -> Double# Source #

Read a double-precision floating-point value; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsStablePtr# :: ByteArray# -> Int# -> StablePtr# a Source #

Read a StablePtr# value; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsInt16# :: ByteArray# -> Int# -> Int16# Source #

Read a 16-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsWord16# :: ByteArray# -> Int# -> Word16# Source #

Read a 16-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsInt32# :: ByteArray# -> Int# -> Int32# Source #

Read a 32-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsWord32# :: ByteArray# -> Int# -> Word32# Source #

Read a 32-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsInt64# :: ByteArray# -> Int# -> Int64# Source #

Read a 64-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8ArrayAsWord64# :: ByteArray# -> Int# -> Word64# Source #

Read a 64-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readCharArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Char# #) Source #

Read an 8-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

readWideCharArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Char# #) Source #

Read a 32-bit character; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

readIntArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) Source #

Read a word-sized integer; offset in machine words.

Warning: this can fail with an unchecked exception.

readWordArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) Source #

Read a word-sized unsigned integer; offset in machine words.

Warning: this can fail with an unchecked exception.

readAddrArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Addr# #) Source #

Read a machine address; offset in machine words.

Warning: this can fail with an unchecked exception.

readFloatArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Float# #) Source #

Read a single-precision floating-point value; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

readDoubleArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Double# #) Source #

Read a double-precision floating-point value; offset in 8-byte words.

Warning: this can fail with an unchecked exception.

readStablePtrArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, StablePtr# a #) Source #

Read a StablePtr# value; offset in machine words.

Warning: this can fail with an unchecked exception.

readInt8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8# #) Source #

Read an 8-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8# #) Source #

Read an 8-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readInt16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16# #) Source #

Read a 16-bit signed integer; offset in 2-byte words.

Warning: this can fail with an unchecked exception.

readWord16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16# #) Source #

Read a 16-bit unsigned integer; offset in 2-byte words.

Warning: this can fail with an unchecked exception.

readInt32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32# #) Source #

Read a 32-bit signed integer; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

readWord32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32# #) Source #

Read a 32-bit unsigned integer; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

readInt64Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64# #) Source #

Read a 64-bit signed integer; offset in 8-byte words.

Warning: this can fail with an unchecked exception.

readWord64Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64# #) Source #

Read a 64-bit unsigned integer; offset in 8-byte words.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsChar# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Char# #) Source #

Read an 8-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsWideChar# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Char# #) Source #

Read a 32-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsInt# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) Source #

Read a word-sized integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsWord# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) Source #

Read a word-sized unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsAddr# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Addr# #) Source #

Read a machine address; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsFloat# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Float# #) Source #

Read a single-precision floating-point value; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsDouble# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Double# #) Source #

Read a double-precision floating-point value; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsStablePtr# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, StablePtr# a #) Source #

Read a StablePtr# value; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsInt16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16# #) Source #

Read a 16-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsWord16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16# #) Source #

Read a 16-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsInt32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32# #) Source #

Read a 32-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsWord32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32# #) Source #

Read a 32-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsInt64# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64# #) Source #

Read a 64-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8ArrayAsWord64# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64# #) Source #

Read a 64-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeCharArray# :: MutableByteArray# d -> Int# -> Char# -> State# d -> State# d Source #

Write an 8-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWideCharArray# :: MutableByteArray# d -> Int# -> Char# -> State# d -> State# d Source #

Write a 32-bit character; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

writeIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d Source #

Write a word-sized integer; offset in machine words.

Warning: this can fail with an unchecked exception.

writeWordArray# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d Source #

Write a word-sized unsigned integer; offset in machine words.

Warning: this can fail with an unchecked exception.

writeAddrArray# :: MutableByteArray# d -> Int# -> Addr# -> State# d -> State# d Source #

Write a machine address; offset in machine words.

Warning: this can fail with an unchecked exception.

writeFloatArray# :: MutableByteArray# d -> Int# -> Float# -> State# d -> State# d Source #

Write a single-precision floating-point value; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

writeDoubleArray# :: MutableByteArray# d -> Int# -> Double# -> State# d -> State# d Source #

Write a double-precision floating-point value; offset in 8-byte words.

Warning: this can fail with an unchecked exception.

writeStablePtrArray# :: MutableByteArray# d -> Int# -> StablePtr# a -> State# d -> State# d Source #

Write a StablePtr# value; offset in machine words.

Warning: this can fail with an unchecked exception.

writeInt8Array# :: MutableByteArray# d -> Int# -> Int8# -> State# d -> State# d Source #

Write an 8-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8Array# :: MutableByteArray# d -> Int# -> Word8# -> State# d -> State# d Source #

Write an 8-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeInt16Array# :: MutableByteArray# d -> Int# -> Int16# -> State# d -> State# d Source #

Write a 16-bit signed integer; offset in 2-byte words.

Warning: this can fail with an unchecked exception.

writeWord16Array# :: MutableByteArray# d -> Int# -> Word16# -> State# d -> State# d Source #

Write a 16-bit unsigned integer; offset in 2-byte words.

Warning: this can fail with an unchecked exception.

writeInt32Array# :: MutableByteArray# d -> Int# -> Int32# -> State# d -> State# d Source #

Write a 32-bit signed integer; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

writeWord32Array# :: MutableByteArray# d -> Int# -> Word32# -> State# d -> State# d Source #

Write a 32-bit unsigned integer; offset in 4-byte words.

Warning: this can fail with an unchecked exception.

writeInt64Array# :: MutableByteArray# d -> Int# -> Int64# -> State# d -> State# d Source #

Write a 64-bit signed integer; offset in 8-byte words.

Warning: this can fail with an unchecked exception.

writeWord64Array# :: MutableByteArray# d -> Int# -> Word64# -> State# d -> State# d Source #

Write a 64-bit unsigned integer; offset in 8-byte words.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsChar# :: MutableByteArray# d -> Int# -> Char# -> State# d -> State# d Source #

Write an 8-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsWideChar# :: MutableByteArray# d -> Int# -> Char# -> State# d -> State# d Source #

Write a 32-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsInt# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d Source #

Write a word-sized integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsWord# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d Source #

Write a word-sized unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsAddr# :: MutableByteArray# d -> Int# -> Addr# -> State# d -> State# d Source #

Write a machine address; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsFloat# :: MutableByteArray# d -> Int# -> Float# -> State# d -> State# d Source #

Write a single-precision floating-point value; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsDouble# :: MutableByteArray# d -> Int# -> Double# -> State# d -> State# d Source #

Write a double-precision floating-point value; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsStablePtr# :: MutableByteArray# d -> Int# -> StablePtr# a -> State# d -> State# d Source #

Write a StablePtr# value; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsInt16# :: MutableByteArray# d -> Int# -> Int16# -> State# d -> State# d Source #

Write a 16-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsWord16# :: MutableByteArray# d -> Int# -> Word16# -> State# d -> State# d Source #

Write a 16-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsInt32# :: MutableByteArray# d -> Int# -> Int32# -> State# d -> State# d Source #

Write a 32-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsWord32# :: MutableByteArray# d -> Int# -> Word32# -> State# d -> State# d Source #

Write a 32-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsInt64# :: MutableByteArray# d -> Int# -> Int64# -> State# d -> State# d Source #

Write a 64-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8ArrayAsWord64# :: MutableByteArray# d -> Int# -> Word64# -> State# d -> State# d Source #

Write a 64-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

compareByteArrays# :: ByteArray# -> Int# -> ByteArray# -> Int# -> Int# -> Int# Source #

compareByteArrays# src1 src1_ofs src2 src2_ofs n compares n bytes starting at offset src1_ofs in the first ByteArray# src1 to the range of n bytes (i.e. same length) starting at offset src2_ofs of the second ByteArray# src2. Both arrays must fully contain the specified ranges, but this is not checked. Returns an Int# less than, equal to, or greater than zero if the range is found, respectively, to be byte-wise lexicographically less than, to match, or be greater than the second range.

Warning: this can fail with an unchecked exception.

copyByteArray# :: ByteArray# -> Int# -> MutableByteArray# d -> Int# -> Int# -> State# d -> State# d Source #

copyByteArray# src src_ofs dst dst_ofs len copies the range starting at offset src_ofs of length len from the ByteArray# src to the MutableByteArray# dst starting at offset dst_ofs. Both arrays must fully contain the specified ranges, but this is not checked. The two arrays must not be the same array in different states, but this is not checked either.

Warning: this can fail with an unchecked exception.

copyMutableByteArray# :: MutableByteArray# d -> Int# -> MutableByteArray# d -> Int# -> Int# -> State# d -> State# d Source #

copyMutableByteArray# src src_ofs dst dst_ofs len copies the range starting at offset src_ofs of length len from the MutableByteArray# src to the MutableByteArray# dst starting at offset dst_ofs. Both arrays must fully contain the specified ranges, but this is not checked. The regions are allowed to overlap, although this is only possible when the same array is provided as both the source and the destination.

Warning: this can fail with an unchecked exception.

copyMutableByteArrayNonOverlapping# :: MutableByteArray# d -> Int# -> MutableByteArray# d -> Int# -> Int# -> State# d -> State# d Source #

copyMutableByteArrayNonOverlapping# src src_ofs dst dst_ofs len copies the range starting at offset src_ofs of length len from the MutableByteArray# src to the MutableByteArray# dst starting at offset dst_ofs. Both arrays must fully contain the specified ranges, but this is not checked. The regions are not allowed to overlap, but this is also not checked.

Warning: this can fail with an unchecked exception.

Since: ghc-prim-0.11.0

copyByteArrayToAddr# :: ByteArray# -> Int# -> Addr# -> Int# -> State# d -> State# d Source #

Copy a range of the ByteArray# to the memory range starting at the Addr#. The ByteArray# and the memory region at Addr# must fully contain the specified ranges, but this is not checked. The Addr# must not point into the ByteArray# (e.g. if the ByteArray# were pinned), but this is not checked either.

Warning: this can fail with an unchecked exception.

copyMutableByteArrayToAddr# :: MutableByteArray# d -> Int# -> Addr# -> Int# -> State# d -> State# d Source #

Copy a range of the MutableByteArray# to the memory range starting at the Addr#. The MutableByteArray# and the memory region at Addr# must fully contain the specified ranges, but this is not checked. The Addr# must not point into the MutableByteArray# (e.g. if the MutableByteArray# were pinned), but this is not checked either.

Warning: this can fail with an unchecked exception.

copyAddrToByteArray# :: Addr# -> MutableByteArray# d -> Int# -> Int# -> State# d -> State# d Source #

Copy a memory range starting at the Addr# to the specified range in the MutableByteArray#. The memory region at Addr# and the ByteArray# must fully contain the specified ranges, but this is not checked. The Addr# must not point into the MutableByteArray# (e.g. if the MutableByteArray# were pinned), but this is not checked either.

Warning: this can fail with an unchecked exception.

copyAddrToAddr# :: Addr# -> Addr# -> Int# -> State# RealWorld -> State# RealWorld Source #

copyAddrToAddr# src dest len copies len bytes from src to dest. These two memory ranges are allowed to overlap.

Analogous to the standard C function memmove, but with a different argument order.

Warning: this can fail with an unchecked exception.

Since: ghc-prim-0.11.0

copyAddrToAddrNonOverlapping# :: Addr# -> Addr# -> Int# -> State# RealWorld -> State# RealWorld Source #

copyAddrToAddrNonOverlapping# src dest len copies len bytes from src to dest. As the name suggests, these two memory ranges must not overlap, although this pre-condition is not checked.

Analogous to the standard C function memcpy, but with a different argument order.

Warning: this can fail with an unchecked exception.

Since: ghc-prim-0.11.0

setByteArray# :: MutableByteArray# d -> Int# -> Int# -> Int# -> State# d -> State# d Source #

setByteArray# ba off len c sets the byte range [off, off+len) of the MutableByteArray# to the byte c.

Warning: this can fail with an unchecked exception.

setAddrRange# :: Addr# -> Int# -> Int# -> State# RealWorld -> State# RealWorld Source #

setAddrRange# dest len c sets all of the bytes in [dest, dest+len) to the value c.

Analogous to the standard C function memset, but with a different argument order.

Warning: this can fail with an unchecked exception.

Since: ghc-prim-0.11.0

atomicReadIntArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) Source #

Given an array and an offset in machine words, read an element. The index is assumed to be in bounds. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

atomicWriteIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d Source #

Given an array and an offset in machine words, write an element. The index is assumed to be in bounds. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

casIntArray# :: MutableByteArray# d -> Int# -> Int# -> Int# -> State# d -> (# State# d, Int# #) Source #

Given an array, an offset in machine words, the expected old value, and the new value, perform an atomic compare and swap i.e. write the new value if the current value matches the provided old value. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

casInt8Array# :: MutableByteArray# d -> Int# -> Int8# -> Int8# -> State# d -> (# State# d, Int8# #) Source #

Given an array, an offset in bytes, the expected old value, and the new value, perform an atomic compare and swap i.e. write the new value if the current value matches the provided old value. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

casInt16Array# :: MutableByteArray# d -> Int# -> Int16# -> Int16# -> State# d -> (# State# d, Int16# #) Source #

Given an array, an offset in 16 bit units, the expected old value, and the new value, perform an atomic compare and swap i.e. write the new value if the current value matches the provided old value. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

casInt32Array# :: MutableByteArray# d -> Int# -> Int32# -> Int32# -> State# d -> (# State# d, Int32# #) Source #

Given an array, an offset in 32 bit units, the expected old value, and the new value, perform an atomic compare and swap i.e. write the new value if the current value matches the provided old value. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

casInt64Array# :: MutableByteArray# d -> Int# -> Int64# -> Int64# -> State# d -> (# State# d, Int64# #) Source #

Given an array, an offset in 64 bit units, the expected old value, and the new value, perform an atomic compare and swap i.e. write the new value if the current value matches the provided old value. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchAddIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) Source #

Given an array, and offset in machine words, and a value to add, atomically add the value to the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchSubIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) Source #

Given an array, and offset in machine words, and a value to subtract, atomically subtract the value from the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchAndIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) Source #

Given an array, and offset in machine words, and a value to AND, atomically AND the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchNandIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) Source #

Given an array, and offset in machine words, and a value to NAND, atomically NAND the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchOrIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) Source #

Given an array, and offset in machine words, and a value to OR, atomically OR the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchXorIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) Source #

Given an array, and offset in machine words, and a value to XOR, atomically XOR the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

Addr#

 

data Addr# :: TYPE 'AddrRep Source #

An arbitrary machine address assumed to point outside the garbage-collected heap.

nullAddr# :: Addr# Source #

The null address.

minusAddr# :: Addr# -> Addr# -> Int# Source #

Result is meaningless if two Addr#s are so far apart that their difference doesn't fit in an Int#.

remAddr# :: Addr# -> Int# -> Int# Source #

Return the remainder when the Addr# arg, treated like an Int#, is divided by the Int# arg.

addr2Int# :: Addr# -> Int# Source #

Deprecated: This operation is strongly deprecated.

Coerce directly from address to int.

int2Addr# :: Int# -> Addr# Source #

Deprecated: This operation is strongly deprecated.

Coerce directly from int to address.

indexCharOffAddr# :: Addr# -> Int# -> Char# Source #

Read an 8-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWideCharOffAddr# :: Addr# -> Int# -> Char# Source #

Read a 32-bit character; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexIntOffAddr# :: Addr# -> Int# -> Int# Source #

Read a word-sized integer; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexWordOffAddr# :: Addr# -> Int# -> Word# Source #

Read a word-sized unsigned integer; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexAddrOffAddr# :: Addr# -> Int# -> Addr# Source #

Read a machine address; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexFloatOffAddr# :: Addr# -> Int# -> Float# Source #

Read a single-precision floating-point value; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexDoubleOffAddr# :: Addr# -> Int# -> Double# Source #

Read a double-precision floating-point value; offset in 8-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexStablePtrOffAddr# :: Addr# -> Int# -> StablePtr# a Source #

Read a StablePtr# value; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexInt8OffAddr# :: Addr# -> Int# -> Int8# Source #

Read an 8-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexWord8OffAddr# :: Addr# -> Int# -> Word8# Source #

Read an 8-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

indexInt16OffAddr# :: Addr# -> Int# -> Int16# Source #

Read a 16-bit signed integer; offset in 2-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexWord16OffAddr# :: Addr# -> Int# -> Word16# Source #

Read a 16-bit unsigned integer; offset in 2-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexInt32OffAddr# :: Addr# -> Int# -> Int32# Source #

Read a 32-bit signed integer; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexWord32OffAddr# :: Addr# -> Int# -> Word32# Source #

Read a 32-bit unsigned integer; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexInt64OffAddr# :: Addr# -> Int# -> Int64# Source #

Read a 64-bit signed integer; offset in 8-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

indexWord64OffAddr# :: Addr# -> Int# -> Word64# Source #

Read a 64-bit unsigned integer; offset in 8-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readCharOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Char# #) Source #

Read an 8-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

readWideCharOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Char# #) Source #

Read a 32-bit character; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readIntOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int# #) Source #

Read a word-sized integer; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readWordOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word# #) Source #

Read a word-sized unsigned integer; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readAddrOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Addr# #) Source #

Read a machine address; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readFloatOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Float# #) Source #

Read a single-precision floating-point value; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readDoubleOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Double# #) Source #

Read a double-precision floating-point value; offset in 8-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readStablePtrOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, StablePtr# a #) Source #

Read a StablePtr# value; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readInt8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int8# #) Source #

Read an 8-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readWord8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word8# #) Source #

Read an 8-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

readInt16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int16# #) Source #

Read a 16-bit signed integer; offset in 2-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readWord16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word16# #) Source #

Read a 16-bit unsigned integer; offset in 2-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readInt32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int32# #) Source #

Read a 32-bit signed integer; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readWord32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word32# #) Source #

Read a 32-bit unsigned integer; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readInt64OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int64# #) Source #

Read a 64-bit signed integer; offset in 8-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

readWord64OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word64# #) Source #

Read a 64-bit unsigned integer; offset in 8-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeCharOffAddr# :: Addr# -> Int# -> Char# -> State# d -> State# d Source #

Write an 8-bit character; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWideCharOffAddr# :: Addr# -> Int# -> Char# -> State# d -> State# d Source #

Write a 32-bit character; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeIntOffAddr# :: Addr# -> Int# -> Int# -> State# d -> State# d Source #

Write a word-sized integer; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeWordOffAddr# :: Addr# -> Int# -> Word# -> State# d -> State# d Source #

Write a word-sized unsigned integer; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeAddrOffAddr# :: Addr# -> Int# -> Addr# -> State# d -> State# d Source #

Write a machine address; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeFloatOffAddr# :: Addr# -> Int# -> Float# -> State# d -> State# d Source #

Write a single-precision floating-point value; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeDoubleOffAddr# :: Addr# -> Int# -> Double# -> State# d -> State# d Source #

Write a double-precision floating-point value; offset in 8-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeStablePtrOffAddr# :: Addr# -> Int# -> StablePtr# a -> State# d -> State# d Source #

Write a StablePtr# value; offset in machine words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeInt8OffAddr# :: Addr# -> Int# -> Int8# -> State# d -> State# d Source #

Write an 8-bit signed integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeWord8OffAddr# :: Addr# -> Int# -> Word8# -> State# d -> State# d Source #

Write an 8-bit unsigned integer; offset in bytes.

Warning: this can fail with an unchecked exception.

writeInt16OffAddr# :: Addr# -> Int# -> Int16# -> State# d -> State# d Source #

Write a 16-bit signed integer; offset in 2-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeWord16OffAddr# :: Addr# -> Int# -> Word16# -> State# d -> State# d Source #

Write a 16-bit unsigned integer; offset in 2-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeInt32OffAddr# :: Addr# -> Int# -> Int32# -> State# d -> State# d Source #

Write a 32-bit signed integer; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeWord32OffAddr# :: Addr# -> Int# -> Word32# -> State# d -> State# d Source #

Write a 32-bit unsigned integer; offset in 4-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeInt64OffAddr# :: Addr# -> Int# -> Int64# -> State# d -> State# d Source #

Write a 64-bit signed integer; offset in 8-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

writeWord64OffAddr# :: Addr# -> Int# -> Word64# -> State# d -> State# d Source #

Write a 64-bit unsigned integer; offset in 8-byte words.

On some platforms, the access may fail for an insufficiently aligned Addr#.

Warning: this can fail with an unchecked exception.

atomicExchangeAddrAddr# :: Addr# -> Addr# -> State# d -> (# State# d, Addr# #) Source #

The atomic exchange operation. Atomically exchanges the value at the first address with the Addr# given as second argument. Implies a read barrier.

Warning: this can fail with an unchecked exception.

atomicExchangeWordAddr# :: Addr# -> Word# -> State# d -> (# State# d, Word# #) Source #

The atomic exchange operation. Atomically exchanges the value at the address with the given value. Returns the old value. Implies a read barrier.

Warning: this can fail with an unchecked exception.

atomicCasAddrAddr# :: Addr# -> Addr# -> Addr# -> State# d -> (# State# d, Addr# #) Source #

Compare and swap on a word-sized memory location.

Use as: s -> atomicCasAddrAddr# location expected desired s

This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).

Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

atomicCasWordAddr# :: Addr# -> Word# -> Word# -> State# d -> (# State# d, Word# #) Source #

Compare and swap on a word-sized and aligned memory location.

Use as: s -> atomicCasWordAddr# location expected desired s

This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).

Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

atomicCasWord8Addr# :: Addr# -> Word8# -> Word8# -> State# d -> (# State# d, Word8# #) Source #

Compare and swap on a 8 bit-sized and aligned memory location.

Use as: s -> atomicCasWordAddr8# location expected desired s

This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).

Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

atomicCasWord16Addr# :: Addr# -> Word16# -> Word16# -> State# d -> (# State# d, Word16# #) Source #

Compare and swap on a 16 bit-sized and aligned memory location.

Use as: s -> atomicCasWordAddr16# location expected desired s

This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).

Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

atomicCasWord32Addr# :: Addr# -> Word32# -> Word32# -> State# d -> (# State# d, Word32# #) Source #

Compare and swap on a 32 bit-sized and aligned memory location.

Use as: s -> atomicCasWordAddr32# location expected desired s

This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).

Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

atomicCasWord64Addr# :: Addr# -> Word64# -> Word64# -> State# d -> (# State# d, Word64# #) Source #

Compare and swap on a 64 bit-sized and aligned memory location.

Use as: s -> atomicCasWordAddr64# location expected desired s

This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).

Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchAddWordAddr# :: Addr# -> Word# -> State# d -> (# State# d, Word# #) Source #

Given an address, and a value to add, atomically add the value to the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchSubWordAddr# :: Addr# -> Word# -> State# d -> (# State# d, Word# #) Source #

Given an address, and a value to subtract, atomically subtract the value from the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchAndWordAddr# :: Addr# -> Word# -> State# d -> (# State# d, Word# #) Source #

Given an address, and a value to AND, atomically AND the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchNandWordAddr# :: Addr# -> Word# -> State# d -> (# State# d, Word# #) Source #

Given an address, and a value to NAND, atomically NAND the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchOrWordAddr# :: Addr# -> Word# -> State# d -> (# State# d, Word# #) Source #

Given an address, and a value to OR, atomically OR the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

fetchXorWordAddr# :: Addr# -> Word# -> State# d -> (# State# d, Word# #) Source #

Given an address, and a value to XOR, atomically XOR the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

atomicReadWordAddr# :: Addr# -> State# d -> (# State# d, Word# #) Source #

Given an address, read a machine word. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

atomicWriteWordAddr# :: Addr# -> Word# -> State# d -> State# d Source #

Given an address, write a machine word. Implies a full memory barrier.

Warning: this can fail with an unchecked exception.

Mutable variables

Operations on MutVar#s.

data MutVar# a (b :: TYPE ('BoxedRep l)) :: UnliftedType Source #

A MutVar# behaves like a single-element mutable array.

newMutVar# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. a -> State# d -> (# State# d, MutVar# d a #) Source #

Create MutVar# with specified initial value in specified state thread.

readMutVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutVar# d a -> State# d -> (# State# d, a #) Source #

Read contents of MutVar#. Result is not yet evaluated.

writeMutVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutVar# d a -> a -> State# d -> State# d Source #

Write contents of MutVar#.

atomicSwapMutVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutVar# d a -> a -> State# d -> (# State# d, a #) Source #

Atomically exchange the value of a MutVar#.

atomicModifyMutVar2# :: MutVar# d a -> (a -> c) -> State# d -> (# State# d, a, c #) Source #

Modify the contents of a MutVar#, returning the previous contents x :: a and the result of applying the given function to the previous contents f x :: c.

The data type c (not a newtype!) must be a record whose first field is of lifted type a :: Type and is not unpacked. For example, product types c ~ Solo a or c ~ (a, b) work well. If the record type is both monomorphic and strict in its first field, it's recommended to mark the latter {-# NOUNPACK #-} explicitly.

Under the hood atomicModifyMutVar2# atomically replaces a pointer to an old x :: a with a pointer to a selector thunk fst r, where fst is a selector for the first field of the record and r is a function application thunk r = f x.

atomicModifyIORef2Native from atomic-modify-general package makes an effort to reflect restrictions on c faithfully, providing a well-typed high-level wrapper.

Warning: this can fail with an unchecked exception.

atomicModifyMutVar_# :: MutVar# d a -> (a -> a) -> State# d -> (# State# d, a, a #) Source #

Modify the contents of a MutVar#, returning the previous contents and the result of applying the given function to the previous contents.

Warning: this can fail with an unchecked exception.

casMutVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MutVar# d a -> a -> a -> State# d -> (# State# d, Int#, a #) Source #

Compare-and-swap: perform a pointer equality test between the first value passed to this function and the value stored inside the MutVar#. If the pointers are equal, replace the stored value with the second value passed to this function, otherwise do nothing. Returns the final value stored inside the MutVar#. The Int# indicates whether a swap took place, with 1# meaning that we didn't swap, and 0# that we did. Implies a full memory barrier. Because the comparison is done on the level of pointers, all of the difficulties of using reallyUnsafePtrEquality# correctly apply to casMutVar# as well.

Exceptions

 

catch# :: forall {q :: RuntimeRep} {k :: Levity} (a :: TYPE q) (b :: TYPE ('BoxedRep k)). (State# RealWorld -> (# State# RealWorld, a #)) -> (b -> State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) Source #

catch# k handler s evaluates k s, invoking handler on any exceptions thrown.

Note that the result type here isn't quite as unrestricted as the polymorphic type might suggest; see the section "RuntimeRep polymorphism in continuation-style primops" for details.

raise# :: forall {l :: Levity} {r :: RuntimeRep} (a :: TYPE ('BoxedRep l)) (b :: TYPE r). a -> b Source #

Warning: this can fail with an unchecked exception.

raiseUnderflow# :: forall {r :: RuntimeRep} (b :: TYPE r). (# #) -> b Source #

Warning: this can fail with an unchecked exception.

raiseOverflow# :: forall {r :: RuntimeRep} (b :: TYPE r). (# #) -> b Source #

Warning: this can fail with an unchecked exception.

raiseDivZero# :: forall {r :: RuntimeRep} (b :: TYPE r). (# #) -> b Source #

Warning: this can fail with an unchecked exception.

raiseIO# :: forall {l :: Levity} {r :: RuntimeRep} (a :: TYPE ('BoxedRep l)) (b :: TYPE r). a -> State# RealWorld -> (# State# RealWorld, b #) Source #

maskAsyncExceptions# :: forall {q :: RuntimeRep} (a :: TYPE q). (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) Source #

maskAsyncExceptions# k s evaluates k s such that asynchronous exceptions are deferred until after evaluation has finished.

Note that the result type here isn't quite as unrestricted as the polymorphic type might suggest; see the section "RuntimeRep polymorphism in continuation-style primops" for details.

maskUninterruptible# :: forall {q :: RuntimeRep} (a :: TYPE q). (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) Source #

maskUninterruptible# k s evaluates k s such that asynchronous exceptions are deferred until after evaluation has finished.

Note that the result type here isn't quite as unrestricted as the polymorphic type might suggest; see the section "RuntimeRep polymorphism in continuation-style primops" for details.

unmaskAsyncExceptions# :: forall {q :: RuntimeRep} (a :: TYPE q). (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) Source #

unmaskAsyncUninterruptible# k s evaluates k s such that asynchronous exceptions are unmasked.

Note that the result type here isn't quite as unrestricted as the polymorphic type might suggest; see the section "RuntimeRep polymorphism in continuation-style primops" for details.

Continuations

These operations provide access to first-class delimited continuations, which allow a computation to access and manipulate portions of its current continuation. Operationally, they are implemented by direct manipulation of the RTS call stack, which may provide significant performance gains relative to manual continuation-passing style (CPS) for some programs.

Intuitively, the delimited control operators prompt# and control0# can be understood by analogy to catch# and raiseIO#, respectively:

  • Like catch#, prompt# does not do anything on its own, it just delimits a subcomputation (the source of the name "delimited continuations").
  • Like raiseIO#, control0# aborts to the nearest enclosing prompt# before resuming execution.

However, unlike raiseIO#, control0# does not discard the aborted computation: instead, it captures it in a form that allows it to be resumed later. In other words, control0# does not irreversibly abort the local computation before returning to the enclosing prompt#, it merely suspends it. All local context of the suspended computation is packaged up and returned as an ordinary function that can be invoked at a later point in time to continue execution, which is why the suspended computation is known as a first-class continuation.

In GHC, every continuation prompt is associated with exactly one PromptTag#. Prompt tags are unique, opaque values created by newPromptTag# that may only be compared for equality. Both prompt# and control0# accept a PromptTag# argument, and control0# captures the continuation up to the nearest enclosing use of prompt# with the same tag. This allows a program to control exactly which prompt it will abort to by using different tags, similar to how a program can control which catch it will abort to by throwing different types of exceptions. Additionally, PromptTag# accepts a single type parameter, which is used to relate the expected result type at the point of the prompt# to the type of the continuation produced by control0#.

The gory details

The high-level explanation provided above should hopefully provide some intuition for what these operations do, but it is not very precise; this section provides a more thorough explanation.

The prompt# operation morally has the following type:

prompt# :: PromptTag# a -> IO a -> IO a

If a computation m never calls control0#, then prompt# tag m is equivalent to just m, i.e. the prompt# is a no-op. This implies the following law:

\[ \mathtt{prompt\#}\ \mathit{tag}\ (\mathtt{pure}\ x) \equiv \mathtt{pure}\ x \]

The control0# operation morally has the following type:

control0# :: PromptTag# a -> ((IO b -> IO a) -> IO a) -> IO b

control0# tag f captures the current continuation up to the nearest enclosing prompt# tag and resumes execution from the point of the call to prompt#, passing the captured continuation to f. To make that somewhat more precise, we can say control0# obeys the following law:

\[ \mathtt{prompt\#}\ \mathit{tag}\ (\mathtt{control0\#}\ tag\ f \mathbin{\mathtt{>>=}} k) \equiv f\ (\lambda\ m \rightarrow m \mathbin{\mathtt{>>=}} k) \]

However, this law does not fully describe the behavior of control0#, as it does not account for situations where control0# does not appear immediately inside prompt#. Capturing the semantics more precisely requires some additional notational machinery; a common approach is to use reduction semantics. Assuming an appropriate definition of evaluation contexts \(E\), the semantics of prompt# and control0# can be given as follows:

\[ \begin{aligned} E[\mathtt{prompt\#}\ \mathit{tag}\ (\mathtt{pure}\ v)] &\longrightarrow E[\mathtt{pure}\ v] \\[8pt] E_1[\mathtt{prompt\#}\ \mathit{tag}\ E_2[\mathtt{control0\#}\ tag\ f]] &\longrightarrow E_1[f\ (\lambda\ m \rightarrow E_2[m])] \\[-2pt] \mathrm{where}\;\: \mathtt{prompt\#}\ \mathit{tag} &\not\in E_2 \end{aligned} \]

A full treatment of the semantics and metatheory of delimited control is well outside the scope of this documentation, but a good, thorough overview (in Haskell) is provided in A Monadic Framework for Delimited Continuations by Dybvig et al.

Safety and invariants

Correct uses of control0# must obey the following restrictions:

  1. The behavior of control0# is only well-defined within a /strict State# thread/, such as those associated with IO and strict ST computations.
  2. Furthermore, control0# may only be called within the dynamic extent of a prompt# with a matching tag somewhere in the current strict State# thread. Effectively, this means that a matching prompt must exist somewhere, and the captured continuation must not contain any uses of unsafePerformIO, runST, unsafeInterleaveIO, etc. For example, the following program is ill-defined:

    prompt# tag $
      evaluate (unsafePerformIO $ control0# tag f)
    

    In this example, the use of prompt# appears in a different State# thread from the use of control0#, so there is no valid prompt in scope to capture up to.

  3. Finally, control0# may not be used within State# threads associated with an STM transaction (i.e. those introduced by atomically#).

If the runtime is able to detect that any of these invariants have been violated in a way that would compromise internal invariants of the runtime, control0# will fail by raising an exception. However, such violations are only detected on a best-effort basis, as the bookkeeping necessary for detecting all illegal uses of control0# would have significant overhead. Therefore, although the operations are “safe” from the runtime’s point of view (e.g. they will not compromise memory safety or clobber internal runtime state), it is still ultimately the programmer’s responsibility to ensure these invariants hold to guarantee predictable program behavior.

In a similar vein, since each captured continuation includes the full local context of the suspended computation, it can safely be resumed arbitrarily many times without violating any invariants of the runtime system. However, use of these operations in an arbitrary IO computation may be unsafe for other reasons, as most IO code is not written with reentrancy in mind. For example, a computation suspended in the middle of reading a file will likely finish reading it when it is resumed; further attempts to resume from the same place would then fail because the file handle was already closed.

In other words, although the RTS ensures that a computation’s control state and local variables are properly restored for each distinct resumption of a continuation, it makes no attempt to duplicate any local state the computation may have been using (and could not possibly do so in general). Furthermore, it provides no mechanism for an arbitrary computation to protect itself against unwanted reentrancy (i.e. there is no analogue to Scheme’s dynamic-wind). For those reasons, manipulating the continuation is only safe if the caller can be certain that doing so will not violate any expectations or invariants of the enclosing computation.

control0# :: forall {r :: RuntimeRep} a (b :: TYPE r). PromptTag# a -> (((State# RealWorld -> (# State# RealWorld, b #)) -> State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, b #) Source #

See GHC.Prim.

STM-accessible Mutable Variables

 

data TVar# a (b :: TYPE ('BoxedRep l)) :: UnliftedType Source #

atomically# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) Source #

retry# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). State# RealWorld -> (# State# RealWorld, a #) Source #

catchRetry# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). (State# RealWorld -> (# State# RealWorld, a #)) -> (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) Source #

catchSTM# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) b. (State# RealWorld -> (# State# RealWorld, a #)) -> (b -> State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) Source #

newTVar# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. a -> State# d -> (# State# d, TVar# d a #) Source #

Create a new TVar# holding a specified initial value.

readTVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). TVar# d a -> State# d -> (# State# d, a #) Source #

Read contents of TVar# inside an STM transaction, i.e. within a call to atomically#. Does not force evaluation of the result.

readTVarIO# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). TVar# d a -> State# d -> (# State# d, a #) Source #

Read contents of TVar# outside an STM transaction. Does not force evaluation of the result.

writeTVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). TVar# d a -> a -> State# d -> State# d Source #

Write contents of TVar#.

Synchronized Mutable Variables

Operations on MVar#s.

data MVar# a (b :: TYPE ('BoxedRep l)) :: UnliftedType Source #

A shared mutable variable (not the same as a MutVar#!). (Note: in a non-concurrent implementation, (MVar# a) can be represented by (MutVar# (Maybe a)).)

newMVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). State# d -> (# State# d, MVar# d a #) Source #

Create new MVar#; initially empty.

takeMVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MVar# d a -> State# d -> (# State# d, a #) Source #

If MVar# is empty, block until it becomes full. Then remove and return its contents, and set it empty.

tryTakeMVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MVar# d a -> State# d -> (# State# d, Int#, a #) Source #

If MVar# is empty, immediately return with integer 0 and value undefined. Otherwise, return with integer 1 and contents of MVar#, and set MVar# empty.

putMVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MVar# d a -> a -> State# d -> State# d Source #

If MVar# is full, block until it becomes empty. Then store value arg as its new contents.

tryPutMVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MVar# d a -> a -> State# d -> (# State# d, Int# #) Source #

If MVar# is full, immediately return with integer 0. Otherwise, store value arg as 'MVar#''s new contents, and return with integer 1.

readMVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MVar# d a -> State# d -> (# State# d, a #) Source #

If MVar# is empty, block until it becomes full. Then read its contents without modifying the MVar, without possibility of intervention from other threads.

tryReadMVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MVar# d a -> State# d -> (# State# d, Int#, a #) Source #

If MVar# is empty, immediately return with integer 0 and value undefined. Otherwise, return with integer 1 and contents of MVar#.

isEmptyMVar# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). MVar# d a -> State# d -> (# State# d, Int# #) Source #

Return 1 if MVar# is empty; 0 otherwise.

Synchronized I/O Ports

Operations on IOPort#s.

data IOPort# a (b :: TYPE ('BoxedRep l)) :: UnliftedType Source #

A shared I/O port is almost the same as an MVar#. The main difference is that IOPort has no deadlock detection or deadlock breaking code that forcibly releases the lock.

newIOPort# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). State# d -> (# State# d, IOPort# d a #) Source #

Create new IOPort#; initially empty.

readIOPort# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). IOPort# d a -> State# d -> (# State# d, a #) Source #

If IOPort# is empty, block until it becomes full. Then remove and return its contents, and set it empty. Throws an IOPortException if another thread is already waiting to read this IOPort#.

writeIOPort# :: forall {l :: Levity} d (a :: TYPE ('BoxedRep l)). IOPort# d a -> a -> State# d -> (# State# d, Int# #) Source #

If IOPort# is full, immediately return with integer 0, throwing an IOPortException. Otherwise, store value arg as 'IOPort#''s new contents, and return with integer 1.

Delay/wait operations

 

delay# :: Int# -> State# d -> State# d Source #

Sleep specified number of microseconds.

waitRead# :: Int# -> State# d -> State# d Source #

Block until input is available on specified file descriptor.

waitWrite# :: Int# -> State# d -> State# d Source #

Block until output is possible on specified file descriptor.

Concurrency primitives

 

data State# a :: ZeroBitType Source #

State# is the primitive, unlifted type of states. It has one type parameter, thus State# RealWorld, or State# s, where s is a type variable. The only purpose of the type parameter is to keep different state threads separate. It is represented by nothing at all.

data RealWorld Source #

RealWorld is deeply magical. It is primitive, but it is not unlifted (hence ptrArg). We never manipulate values of type RealWorld; it's only used in the type system, to parameterise State#.

data ThreadId# :: UnliftedType Source #

(In a non-concurrent implementation, this can be a singleton type, whose (unique) value is returned by myThreadId#. The other operations can be omitted.)

fork# :: forall {q :: RuntimeRep} (a :: TYPE q). (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, ThreadId# #) Source #

forkOn# :: forall {q :: RuntimeRep} (a :: TYPE q). Int# -> (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, ThreadId# #) Source #

labelThread# :: ThreadId# -> ByteArray# -> State# RealWorld -> State# RealWorld Source #

Set the label of the given thread. The ByteArray# should contain a UTF-8-encoded string.

threadLabel# :: ThreadId# -> State# RealWorld -> (# State# RealWorld, Int#, ByteArray# #) Source #

Get the label of the given thread. Morally of type ThreadId# -> IO (Maybe ByteArray#), with a 1# tag denoting Just.

Since: ghc-prim-0.10

threadStatus# :: ThreadId# -> State# RealWorld -> (# State# RealWorld, Int#, Int#, Int# #) Source #

Get the status of the given thread. Result is (ThreadStatus, Capability, Locked) where ThreadStatus is one of the status constants defined in rts/Constants.h, Capability is the number of the capability which currently owns the thread, and Locked is a boolean indicating whether the thread is bound to that capability.

Since: ghc-prim-0.9

listThreads# :: State# RealWorld -> (# State# RealWorld, Array# ThreadId# #) Source #

Returns an array of the threads started by the program. Note that this threads which have finished execution may or may not be present in this list, depending upon whether they have been collected by the garbage collector.

Since: ghc-prim-0.10

Weak pointers

 

data Weak# (a :: TYPE ('BoxedRep l)) :: UnliftedType Source #

mkWeak# :: forall {l :: Levity} {k :: Levity} (a :: TYPE ('BoxedRep l)) (b :: TYPE ('BoxedRep k)) c. a -> b -> (State# RealWorld -> (# State# RealWorld, c #)) -> State# RealWorld -> (# State# RealWorld, Weak# b #) Source #

mkWeak# k v finalizer s creates a weak reference to value k, with an associated reference to some value v. If k is still alive then v can be retrieved using deRefWeak#. Note that the type of k must be represented by a pointer (i.e. of kind TYPE 'LiftedRep or TYPE 'UnliftedRep@).

mkWeakNoFinalizer# :: forall {l :: Levity} {k :: Levity} (a :: TYPE ('BoxedRep l)) (b :: TYPE ('BoxedRep k)). a -> b -> State# RealWorld -> (# State# RealWorld, Weak# b #) Source #

addCFinalizerToWeak# :: forall {k :: Levity} (b :: TYPE ('BoxedRep k)). Addr# -> Addr# -> Int# -> Addr# -> Weak# b -> State# RealWorld -> (# State# RealWorld, Int# #) Source #

addCFinalizerToWeak# fptr ptr flag eptr w attaches a C function pointer fptr to a weak pointer w as a finalizer. If flag is zero, fptr will be called with one argument, ptr. Otherwise, it will be called with two arguments, eptr and ptr. addCFinalizerToWeak# returns 1 on success, or 0 if w is already dead.

deRefWeak# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, a #) Source #

finalizeWeak# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) b. Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, State# RealWorld -> (# State# RealWorld, b #) #) Source #

Finalize a weak pointer. The return value is an unboxed tuple containing the new state of the world and an "unboxed Maybe", represented by an Int# and a (possibly invalid) finalization action. An Int# of 1 indicates that the finalizer is valid. The return value b from the finalizer should be ignored.

touch# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)) d. a -> State# d -> State# d Source #

Stable pointers and names

 

data StablePtr# (a :: TYPE ('BoxedRep l)) :: TYPE 'AddrRep Source #

makeStablePtr# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). a -> State# RealWorld -> (# State# RealWorld, StablePtr# a #) Source #

deRefStablePtr# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). StablePtr# a -> State# RealWorld -> (# State# RealWorld, a #) Source #

eqStablePtr# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). StablePtr# a -> StablePtr# a -> Int# Source #

makeStableName# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). a -> State# RealWorld -> (# State# RealWorld, StableName# a #) Source #

stableNameToInt# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). StableName# a -> Int# Source #

Compact normal form

Primitives for working with compact regions. The ghc-compact library and the compact library demonstrate how to use these primitives. The documentation below draws a distinction between a CNF and a compact block. A CNF contains one or more compact blocks. The source file rts/sm/CNF.c diagrams this relationship. When discussing a compact block, an additional distinction is drawn between capacity and utilized bytes. The capacity is the maximum number of bytes that the compact block can hold. The utilized bytes is the number of bytes that are actually used by the compact block.

compactNew# :: Word# -> State# RealWorld -> (# State# RealWorld, Compact# #) Source #

Create a new CNF with a single compact block. The argument is the capacity of the compact block (in bytes, not words). The capacity is rounded up to a multiple of the allocator block size and is capped to one mega block.

compactResize# :: Compact# -> Word# -> State# RealWorld -> State# RealWorld Source #

Set the new allocation size of the CNF. This value (in bytes) determines the capacity of each compact block in the CNF. It does not retroactively affect existing compact blocks in the CNF.

compactContains# :: Compact# -> a -> State# RealWorld -> (# State# RealWorld, Int# #) Source #

Returns 1# if the object is contained in the CNF, 0# otherwise.

compactContainsAny# :: a -> State# RealWorld -> (# State# RealWorld, Int# #) Source #

Returns 1# if the object is in any CNF at all, 0# otherwise.

compactGetFirstBlock# :: Compact# -> State# RealWorld -> (# State# RealWorld, Addr#, Word# #) Source #

Returns the address and the utilized size (in bytes) of the first compact block of a CNF.

compactGetNextBlock# :: Compact# -> Addr# -> State# RealWorld -> (# State# RealWorld, Addr#, Word# #) Source #

Given a CNF and the address of one its compact blocks, returns the next compact block and its utilized size, or nullAddr# if the argument was the last compact block in the CNF.

compactAllocateBlock# :: Word# -> Addr# -> State# RealWorld -> (# State# RealWorld, Addr# #) Source #

Attempt to allocate a compact block with the capacity (in bytes) given by the first argument. The Addr# is a pointer to previous compact block of the CNF or nullAddr# to create a new CNF with a single compact block.

The resulting block is not known to the GC until compactFixupPointers# is called on it, and care must be taken so that the address does not escape or memory will be leaked.

compactFixupPointers# :: Addr# -> Addr# -> State# RealWorld -> (# State# RealWorld, Compact#, Addr# #) Source #

Given the pointer to the first block of a CNF and the address of the root object in the old address space, fix up the internal pointers inside the CNF to account for a different position in memory than when it was serialized. This method must be called exactly once after importing a serialized CNF. It returns the new CNF and the new adjusted root address.

compactAdd# :: Compact# -> a -> State# RealWorld -> (# State# RealWorld, a #) Source #

Recursively add a closure and its transitive closure to a Compact# (a CNF), evaluating any unevaluated components at the same time. Note: compactAdd# is not thread-safe, so only one thread may call compactAdd# with a particular Compact# at any given time. The primop does not enforce any mutual exclusion; the caller is expected to arrange this.

compactAddWithSharing# :: Compact# -> a -> State# RealWorld -> (# State# RealWorld, a #) Source #

Like compactAdd#, but retains sharing and cycles during compaction.

compactSize# :: Compact# -> State# RealWorld -> (# State# RealWorld, Word# #) Source #

Return the total capacity (in bytes) of all the compact blocks in the CNF.

Unsafe pointer equality

 

reallyUnsafePtrEquality# :: forall {l :: Levity} {k :: Levity} (a :: TYPE ('BoxedRep l)) (b :: TYPE ('BoxedRep k)). a -> b -> Int# Source #

Returns 1# if the given pointers are equal and 0# otherwise.

Warning: this can fail with an unchecked exception.

Parallelism

 

par# :: a -> Int# Source #

Deprecated: Use spark# instead

spark# :: a -> State# d -> (# State# d, a #) Source #

seq# :: a -> State# d -> (# State# d, a #) Source #

getSpark# :: State# d -> (# State# d, Int#, a #) Source #

numSparks# :: State# d -> (# State# d, Int# #) Source #

Returns the number of sparks in the local spark pool.

Controlling object lifetime

Ensuring that objects don't die a premature death.

keepAlive# :: forall {l :: Levity} {r :: RuntimeRep} (a :: TYPE ('BoxedRep l)) d (b :: TYPE r). a -> State# d -> (State# d -> b) -> b Source #

keepAlive# x s k keeps the value x alive during the execution of the computation k.

Note that the result type here isn't quite as unrestricted as the polymorphic type might suggest; see the section "RuntimeRep polymorphism in continuation-style primops" for details.

Tag to enum stuff

Convert back and forth between values of enumerated types and small integers.

dataToTag# :: a -> Int# Source #

Evaluates the argument and returns the tag of the result. Tags are Zero-indexed; the first constructor has tag zero.

Bytecode operations

Support for manipulating bytecode objects used by the interpreter and linker.

Bytecode objects are heap objects which represent top-level bindings and contain a list of instructions and data needed by these instructions.

data BCO Source #

Primitive bytecode type.

addrToAny# :: forall {l :: Levity} (a :: TYPE ('BoxedRep l)). Addr# -> (# a #) Source #

Convert an Addr# to a followable Any type.

anyToAddr# :: a -> State# RealWorld -> (# State# RealWorld, Addr# #) Source #

Retrieve the address of any Haskell value. This is essentially an unsafeCoerce#, but if implemented as such the core lint pass complains and fails to compile. As a primop, it is opaque to core/stg, and only appears in cmm (where the copy propagation pass will get rid of it). Note that "a" must be a value, not a thunk! It's too late for strictness analysis to enforce this, so you're on your own to guarantee this. Also note that Addr# is not a GC pointer - up to you to guarantee that it does not become a dangling pointer immediately after you get it.

mkApUpd0# :: BCO -> (# a #) Source #

Wrap a BCO in a AP_UPD thunk which will be updated with the value of the BCO when evaluated.

newBCO# :: ByteArray# -> ByteArray# -> Array# a -> Int# -> ByteArray# -> State# d -> (# State# d, BCO #) Source #

newBCO# instrs lits ptrs arity bitmap creates a new bytecode object. The resulting object encodes a function of the given arity with the instructions encoded in instrs, and a static reference table usage bitmap given by bitmap.

unpackClosure# :: a -> (# Addr#, ByteArray#, Array# b #) Source #

unpackClosure# closure copies the closure and pointers in the payload of the given closure into two new arrays, and returns a pointer to the first word of the closure's info table, a non-pointer array for the raw bytes of the closure, and a pointer array for the pointers in the payload.

closureSize# :: a -> Int# Source #

closureSize# closure returns the size of the given closure in machine words.

getApStackVal# :: a -> Int# -> (# Int#, b #) Source #

Misc

These aren't nearly as wired in as Etc...

getCCSOf# :: a -> State# d -> (# State# d, Addr# #) Source #

getCurrentCCS# :: a -> State# d -> (# State# d, Addr# #) Source #

Returns the current CostCentreStack (value is NULL if not profiling). Takes a dummy argument which can be used to avoid the call to getCurrentCCS# being floated out by the simplifier, which would result in an uninformative stack (CAF).

clearCCS# :: (State# d -> (# State# d, a #)) -> State# d -> (# State# d, a #) Source #

Run the supplied IO action with an empty CCS. For example, this is used by the interpreter to run an interpreted computation without the call stack showing that it was invoked from GHC.

Info Table Origin

 

whereFrom# :: a -> State# d -> (# State# d, Addr# #) Source #

Returns the InfoProvEnt for the info table of the given object (value is NULL if the table does not exist or there is no information about the closure).

Etc

Miscellaneous built-ins

data FUN Source #

The builtin function type, written in infix form as a % m -> b. Values of this type are functions taking inputs of type a and producing outputs of type b. The multiplicity of the input is m.

Note that FUN m a b permits representation polymorphism in both a and b, so that types like Int# -> Int# can still be well-kinded.

realWorld# :: State# RealWorld Source #

The token used in the implementation of the IO monad as a state monad. It does not pass any information at runtime. See also runRW#.

void# :: (# #) Source #

Deprecated: Use an unboxed unit tuple instead

This is an alias for the unboxed unit tuple constructor. In earlier versions of GHC, void# was a value of the primitive type Void#, which is now defined to be (# #).

data Proxy# (a :: k) :: ZeroBitType Source #

The type constructor Proxy# is used to bear witness to some type variable. It's used when you want to pass around proxy values for doing things like modelling type applications. A Proxy# is not only unboxed, it also has a polymorphic kind, and has no runtime representation, being totally free.

proxy# :: forall {k} (a :: k). Proxy# a Source #

Witness for an unboxed Proxy# value, which has no runtime representation.

seq :: forall {r :: RuntimeRep} a (b :: TYPE r). a -> b -> b infixr 0 Source #

The value of seq a b is bottom if a is bottom, and otherwise equal to b. In other words, it evaluates the first argument a to weak head normal form (WHNF). seq is usually introduced to improve performance by avoiding unneeded laziness.

A note on evaluation order: the expression seq a b does not guarantee that a will be evaluated before b. The only guarantee given by seq is that the both a and b will be evaluated before seq returns a value. In particular, this means that b may be evaluated before a. If you need to guarantee a specific order of evaluation, you must use the function pseq from the "parallel" package.

traceEvent# :: Addr# -> State# d -> State# d Source #

Emits an event via the RTS tracing framework. The contents of the event is the zero-terminated byte string passed as the first argument. The event will be emitted either to the .eventlog file, or to stderr, depending on the runtime RTS flags.

traceBinaryEvent# :: Addr# -> Int# -> State# d -> State# d Source #

Emits an event via the RTS tracing framework. The contents of the event is the binary object passed as the first argument with the given length passed as the second argument. The event will be emitted to the .eventlog file.

traceMarker# :: Addr# -> State# d -> State# d Source #

Emits a marker event via the RTS tracing framework. The contents of the event is the zero-terminated byte string passed as the first argument. The event will be emitted either to the .eventlog file, or to stderr, depending on the runtime RTS flags.

setThreadAllocationCounter# :: Int64# -> State# RealWorld -> State# RealWorld Source #

Sets the allocation counter for the current thread to the given value.

data StackSnapshot# :: UnliftedType Source #

Haskell representation of a StgStack* that was created (cloned) with a function in GHC.Stack.CloneStack. Please check the documentation in that module for more detailed explanations.

Safe coercions

 

coerce :: forall {k :: RuntimeRep} (a :: TYPE k) (b :: TYPE k). Coercible a b => a -> b Source #

The function coerce allows you to safely convert between values of types that have the same representation with no run-time overhead. In the simplest case you can use it instead of a newtype constructor, to go from the newtype's concrete type to the abstract type. But it also works in more complicated settings, e.g. converting a list of newtypes to a list of concrete types.

When used in conversions involving a newtype wrapper, make sure the newtype constructor is in scope.

This function is representation-polymorphic, but the RuntimeRep type argument is marked as Inferred, meaning that it is not available for visible type application. This means the typechecker will accept coerce @Int @Age 42.

Examples

Expand
>>> newtype TTL = TTL Int deriving (Eq, Ord, Show)
>>> newtype Age = Age Int deriving (Eq, Ord, Show)
>>> coerce (Age 42) :: TTL
TTL 42
>>> coerce (+ (1 :: Int)) (Age 42) :: TTL
TTL 43
>>> coerce (map (+ (1 :: Int))) [Age 42, Age 24] :: [TTL]
[TTL 43,TTL 25]

SIMD Vectors

Operations on SIMD vectors.

data Int8X16# :: TYPE ('VecRep 'Vec16 'Int8ElemRep) Source #

Warning: this is only available on LLVM.

data Int16X8# :: TYPE ('VecRep 'Vec8 'Int16ElemRep) Source #

Warning: this is only available on LLVM.

data Int32X4# :: TYPE ('VecRep 'Vec4 'Int32ElemRep) Source #

Warning: this is only available on LLVM.

data Int64X2# :: TYPE ('VecRep 'Vec2 'Int64ElemRep) Source #

Warning: this is only available on LLVM.

data Int8X32# :: TYPE ('VecRep 'Vec32 'Int8ElemRep) Source #

Warning: this is only available on LLVM.

data Int16X16# :: TYPE ('VecRep 'Vec16 'Int16ElemRep) Source #

Warning: this is only available on LLVM.

data Int32X8# :: TYPE ('VecRep 'Vec8 'Int32ElemRep) Source #

Warning: this is only available on LLVM.

data Int64X4# :: TYPE ('VecRep 'Vec4 'Int64ElemRep) Source #

Warning: this is only available on LLVM.

data Int8X64# :: TYPE ('VecRep 'Vec64 'Int8ElemRep) Source #

Warning: this is only available on LLVM.

data Int16X32# :: TYPE ('VecRep 'Vec32 'Int16ElemRep) Source #

Warning: this is only available on LLVM.

data Int32X16# :: TYPE ('VecRep 'Vec16 'Int32ElemRep) Source #

Warning: this is only available on LLVM.

data Int64X8# :: TYPE ('VecRep 'Vec8 'Int64ElemRep) Source #

Warning: this is only available on LLVM.

data Word8X16# :: TYPE ('VecRep 'Vec16 'Word8ElemRep) Source #

Warning: this is only available on LLVM.

data Word16X8# :: TYPE ('VecRep 'Vec8 'Word16ElemRep) Source #

Warning: this is only available on LLVM.

data Word32X4# :: TYPE ('VecRep 'Vec4 'Word32ElemRep) Source #

Warning: this is only available on LLVM.

data Word64X2# :: TYPE ('VecRep 'Vec2 'Word64ElemRep) Source #

Warning: this is only available on LLVM.

data Word8X32# :: TYPE ('VecRep 'Vec32 'Word8ElemRep) Source #

Warning: this is only available on LLVM.

data Word16X16# :: TYPE ('VecRep 'Vec16 'Word16ElemRep) Source #

Warning: this is only available on LLVM.

data Word32X8# :: TYPE ('VecRep 'Vec8 'Word32ElemRep) Source #

Warning: this is only available on LLVM.

data Word64X4# :: TYPE ('VecRep 'Vec4 'Word64ElemRep) Source #

Warning: this is only available on LLVM.

data Word8X64# :: TYPE ('VecRep 'Vec64 'Word8ElemRep) Source #

Warning: this is only available on LLVM.

data Word16X32# :: TYPE ('VecRep 'Vec32 'Word16ElemRep) Source #

Warning: this is only available on LLVM.

data Word32X16# :: TYPE ('VecRep 'Vec16 'Word32ElemRep) Source #

Warning: this is only available on LLVM.

data Word64X8# :: TYPE ('VecRep 'Vec8 'Word64ElemRep) Source #

Warning: this is only available on LLVM.

data FloatX4# :: TYPE ('VecRep 'Vec4 'FloatElemRep) Source #

Warning: this is only available on LLVM.

data DoubleX2# :: TYPE ('VecRep 'Vec2 'DoubleElemRep) Source #

Warning: this is only available on LLVM.

data FloatX8# :: TYPE ('VecRep 'Vec8 'FloatElemRep) Source #

Warning: this is only available on LLVM.

data DoubleX4# :: TYPE ('VecRep 'Vec4 'DoubleElemRep) Source #

Warning: this is only available on LLVM.

data FloatX16# :: TYPE ('VecRep 'Vec16 'FloatElemRep) Source #

Warning: this is only available on LLVM.

data DoubleX8# :: TYPE ('VecRep 'Vec8 'DoubleElemRep) Source #

Warning: this is only available on LLVM.

broadcastInt8X16# :: Int8# -> Int8X16# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt16X8# :: Int16# -> Int16X8# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt32X4# :: Int32# -> Int32X4# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt64X2# :: Int64# -> Int64X2# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt8X32# :: Int8# -> Int8X32# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt16X16# :: Int16# -> Int16X16# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt32X8# :: Int32# -> Int32X8# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt64X4# :: Int64# -> Int64X4# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt8X64# :: Int8# -> Int8X64# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt16X32# :: Int16# -> Int16X32# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt32X16# :: Int32# -> Int32X16# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastInt64X8# :: Int64# -> Int64X8# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord8X16# :: Word8# -> Word8X16# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord16X8# :: Word16# -> Word16X8# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord32X4# :: Word32# -> Word32X4# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord64X2# :: Word64# -> Word64X2# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord8X32# :: Word8# -> Word8X32# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord16X16# :: Word16# -> Word16X16# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord32X8# :: Word32# -> Word32X8# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord64X4# :: Word64# -> Word64X4# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord8X64# :: Word8# -> Word8X64# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord16X32# :: Word16# -> Word16X32# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord32X16# :: Word32# -> Word32X16# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastWord64X8# :: Word64# -> Word64X8# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastFloatX4# :: Float# -> FloatX4# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastDoubleX2# :: Double# -> DoubleX2# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastFloatX8# :: Float# -> FloatX8# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastDoubleX4# :: Double# -> DoubleX4# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastFloatX16# :: Float# -> FloatX16# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

broadcastDoubleX8# :: Double# -> DoubleX8# Source #

Broadcast a scalar to all elements of a vector.

Warning: this is only available on LLVM.

packInt8X16# :: (# Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8# #) -> Int8X16# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt16X8# :: (# Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16# #) -> Int16X8# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt32X4# :: (# Int32#, Int32#, Int32#, Int32# #) -> Int32X4# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt64X2# :: (# Int64#, Int64# #) -> Int64X2# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt8X32# :: (# Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8# #) -> Int8X32# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt16X16# :: (# Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16# #) -> Int16X16# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt32X8# :: (# Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32# #) -> Int32X8# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt64X4# :: (# Int64#, Int64#, Int64#, Int64# #) -> Int64X4# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt8X64# :: (# Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8# #) -> Int8X64# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt16X32# :: (# Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16# #) -> Int16X32# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt32X16# :: (# Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32# #) -> Int32X16# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packInt64X8# :: (# Int64#, Int64#, Int64#, Int64#, Int64#, Int64#, Int64#, Int64# #) -> Int64X8# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord8X16# :: (# Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8# #) -> Word8X16# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord16X8# :: (# Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16# #) -> Word16X8# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord32X4# :: (# Word32#, Word32#, Word32#, Word32# #) -> Word32X4# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord64X2# :: (# Word64#, Word64# #) -> Word64X2# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord8X32# :: (# Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8# #) -> Word8X32# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord16X16# :: (# Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16# #) -> Word16X16# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord32X8# :: (# Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32# #) -> Word32X8# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord64X4# :: (# Word64#, Word64#, Word64#, Word64# #) -> Word64X4# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord16X32# :: (# Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16# #) -> Word16X32# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord32X16# :: (# Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32# #) -> Word32X16# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packWord64X8# :: (# Word64#, Word64#, Word64#, Word64#, Word64#, Word64#, Word64#, Word64# #) -> Word64X8# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packFloatX4# :: (# Float#, Float#, Float#, Float# #) -> FloatX4# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packDoubleX2# :: (# Double#, Double# #) -> DoubleX2# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packFloatX8# :: (# Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float# #) -> FloatX8# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packDoubleX4# :: (# Double#, Double#, Double#, Double# #) -> DoubleX4# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packFloatX16# :: (# Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float# #) -> FloatX16# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

packDoubleX8# :: (# Double#, Double#, Double#, Double#, Double#, Double#, Double#, Double# #) -> DoubleX8# Source #

Pack the elements of an unboxed tuple into a vector.

Warning: this is only available on LLVM.

unpackInt8X16# :: Int8X16# -> (# Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt16X8# :: Int16X8# -> (# Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt32X4# :: Int32X4# -> (# Int32#, Int32#, Int32#, Int32# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt64X2# :: Int64X2# -> (# Int64#, Int64# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt8X32# :: Int8X32# -> (# Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt16X16# :: Int16X16# -> (# Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt32X8# :: Int32X8# -> (# Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt64X4# :: Int64X4# -> (# Int64#, Int64#, Int64#, Int64# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt8X64# :: Int8X64# -> (# Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8#, Int8# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt16X32# :: Int16X32# -> (# Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16#, Int16# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt32X16# :: Int32X16# -> (# Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32#, Int32# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackInt64X8# :: Int64X8# -> (# Int64#, Int64#, Int64#, Int64#, Int64#, Int64#, Int64#, Int64# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord8X16# :: Word8X16# -> (# Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord16X8# :: Word16X8# -> (# Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord32X4# :: Word32X4# -> (# Word32#, Word32#, Word32#, Word32# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord64X2# :: Word64X2# -> (# Word64#, Word64# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord8X32# :: Word8X32# -> (# Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8#, Word8# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord16X16# :: Word16X16# -> (# Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord32X8# :: Word32X8# -> (# Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord64X4# :: Word64X4# -> (# Word64#, Word64#, Word64#, Word64# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord16X32# :: Word16X32# -> (# Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16#, Word16# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord32X16# :: Word32X16# -> (# Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32#, Word32# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackWord64X8# :: Word64X8# -> (# Word64#, Word64#, Word64#, Word64#, Word64#, Word64#, Word64#, Word64# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackFloatX4# :: FloatX4# -> (# Float#, Float#, Float#, Float# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackDoubleX2# :: DoubleX2# -> (# Double#, Double# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackFloatX8# :: FloatX8# -> (# Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackDoubleX4# :: DoubleX4# -> (# Double#, Double#, Double#, Double# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackFloatX16# :: FloatX16# -> (# Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

unpackDoubleX8# :: DoubleX8# -> (# Double#, Double#, Double#, Double#, Double#, Double#, Double#, Double# #) Source #

Unpack the elements of a vector into an unboxed tuple. #

Warning: this is only available on LLVM.

insertInt8X16# :: Int8X16# -> Int8# -> Int# -> Int8X16# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt16X8# :: Int16X8# -> Int16# -> Int# -> Int16X8# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt32X4# :: Int32X4# -> Int32# -> Int# -> Int32X4# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt64X2# :: Int64X2# -> Int64# -> Int# -> Int64X2# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt8X32# :: Int8X32# -> Int8# -> Int# -> Int8X32# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt16X16# :: Int16X16# -> Int16# -> Int# -> Int16X16# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt32X8# :: Int32X8# -> Int32# -> Int# -> Int32X8# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt64X4# :: Int64X4# -> Int64# -> Int# -> Int64X4# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt8X64# :: Int8X64# -> Int8# -> Int# -> Int8X64# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt16X32# :: Int16X32# -> Int16# -> Int# -> Int16X32# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt32X16# :: Int32X16# -> Int32# -> Int# -> Int32X16# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertInt64X8# :: Int64X8# -> Int64# -> Int# -> Int64X8# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord8X16# :: Word8X16# -> Word8# -> Int# -> Word8X16# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord16X8# :: Word16X8# -> Word16# -> Int# -> Word16X8# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord32X4# :: Word32X4# -> Word32# -> Int# -> Word32X4# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord64X2# :: Word64X2# -> Word64# -> Int# -> Word64X2# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord8X32# :: Word8X32# -> Word8# -> Int# -> Word8X32# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord16X16# :: Word16X16# -> Word16# -> Int# -> Word16X16# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord32X8# :: Word32X8# -> Word32# -> Int# -> Word32X8# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord64X4# :: Word64X4# -> Word64# -> Int# -> Word64X4# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord8X64# :: Word8X64# -> Word8# -> Int# -> Word8X64# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord16X32# :: Word16X32# -> Word16# -> Int# -> Word16X32# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord32X16# :: Word32X16# -> Word32# -> Int# -> Word32X16# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertWord64X8# :: Word64X8# -> Word64# -> Int# -> Word64X8# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertFloatX4# :: FloatX4# -> Float# -> Int# -> FloatX4# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertDoubleX2# :: DoubleX2# -> Double# -> Int# -> DoubleX2# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertFloatX8# :: FloatX8# -> Float# -> Int# -> FloatX8# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertDoubleX4# :: DoubleX4# -> Double# -> Int# -> DoubleX4# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertFloatX16# :: FloatX16# -> Float# -> Int# -> FloatX16# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

insertDoubleX8# :: DoubleX8# -> Double# -> Int# -> DoubleX8# Source #

Insert a scalar at the given position in a vector.

Warning: this is only available on LLVM and can fail with an unchecked exception.

plusInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt16X8# :: Int16X8# -> Int16X8# -> Int16X8# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt32X4# :: Int32X4# -> Int32X4# -> Int32X4# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt64X2# :: Int64X2# -> Int64X2# -> Int64X2# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt8X32# :: Int8X32# -> Int8X32# -> Int8X32# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt16X16# :: Int16X16# -> Int16X16# -> Int16X16# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt32X8# :: Int32X8# -> Int32X8# -> Int32X8# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt64X4# :: Int64X4# -> Int64X4# -> Int64X4# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt8X64# :: Int8X64# -> Int8X64# -> Int8X64# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt16X32# :: Int16X32# -> Int16X32# -> Int16X32# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt32X16# :: Int32X16# -> Int32X16# -> Int32X16# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord8X16# :: Word8X16# -> Word8X16# -> Word8X16# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord32X4# :: Word32X4# -> Word32X4# -> Word32X4# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord64X2# :: Word64X2# -> Word64X2# -> Word64X2# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord8X32# :: Word8X32# -> Word8X32# -> Word8X32# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord16X16# :: Word16X16# -> Word16X16# -> Word16X16# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord32X8# :: Word32X8# -> Word32X8# -> Word32X8# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord64X4# :: Word64X4# -> Word64X4# -> Word64X4# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord8X64# :: Word8X64# -> Word8X64# -> Word8X64# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord16X32# :: Word16X32# -> Word16X32# -> Word16X32# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord32X16# :: Word32X16# -> Word32X16# -> Word32X16# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusWord64X8# :: Word64X8# -> Word64X8# -> Word64X8# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusDoubleX2# :: DoubleX2# -> DoubleX2# -> DoubleX2# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusFloatX8# :: FloatX8# -> FloatX8# -> FloatX8# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusDoubleX4# :: DoubleX4# -> DoubleX4# -> DoubleX4# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusFloatX16# :: FloatX16# -> FloatX16# -> FloatX16# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

plusDoubleX8# :: DoubleX8# -> DoubleX8# -> DoubleX8# Source #

Add two vectors element-wise.

Warning: this is only available on LLVM.

minusInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt16X8# :: Int16X8# -> Int16X8# -> Int16X8# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt32X4# :: Int32X4# -> Int32X4# -> Int32X4# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt64X2# :: Int64X2# -> Int64X2# -> Int64X2# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt8X32# :: Int8X32# -> Int8X32# -> Int8X32# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt16X16# :: Int16X16# -> Int16X16# -> Int16X16# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt32X8# :: Int32X8# -> Int32X8# -> Int32X8# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt64X4# :: Int64X4# -> Int64X4# -> Int64X4# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt8X64# :: Int8X64# -> Int8X64# -> Int8X64# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt16X32# :: Int16X32# -> Int16X32# -> Int16X32# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt32X16# :: Int32X16# -> Int32X16# -> Int32X16# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord8X16# :: Word8X16# -> Word8X16# -> Word8X16# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord32X4# :: Word32X4# -> Word32X4# -> Word32X4# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord64X2# :: Word64X2# -> Word64X2# -> Word64X2# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord8X32# :: Word8X32# -> Word8X32# -> Word8X32# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord16X16# :: Word16X16# -> Word16X16# -> Word16X16# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord32X8# :: Word32X8# -> Word32X8# -> Word32X8# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord64X4# :: Word64X4# -> Word64X4# -> Word64X4# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord8X64# :: Word8X64# -> Word8X64# -> Word8X64# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord16X32# :: Word16X32# -> Word16X32# -> Word16X32# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord32X16# :: Word32X16# -> Word32X16# -> Word32X16# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusWord64X8# :: Word64X8# -> Word64X8# -> Word64X8# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusDoubleX2# :: DoubleX2# -> DoubleX2# -> DoubleX2# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusFloatX8# :: FloatX8# -> FloatX8# -> FloatX8# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusDoubleX4# :: DoubleX4# -> DoubleX4# -> DoubleX4# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusFloatX16# :: FloatX16# -> FloatX16# -> FloatX16# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

minusDoubleX8# :: DoubleX8# -> DoubleX8# -> DoubleX8# Source #

Subtract two vectors element-wise.

Warning: this is only available on LLVM.

timesInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt16X8# :: Int16X8# -> Int16X8# -> Int16X8# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt32X4# :: Int32X4# -> Int32X4# -> Int32X4# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt64X2# :: Int64X2# -> Int64X2# -> Int64X2# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt8X32# :: Int8X32# -> Int8X32# -> Int8X32# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt16X16# :: Int16X16# -> Int16X16# -> Int16X16# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt32X8# :: Int32X8# -> Int32X8# -> Int32X8# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt64X4# :: Int64X4# -> Int64X4# -> Int64X4# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt8X64# :: Int8X64# -> Int8X64# -> Int8X64# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt16X32# :: Int16X32# -> Int16X32# -> Int16X32# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt32X16# :: Int32X16# -> Int32X16# -> Int32X16# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord8X16# :: Word8X16# -> Word8X16# -> Word8X16# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord32X4# :: Word32X4# -> Word32X4# -> Word32X4# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord64X2# :: Word64X2# -> Word64X2# -> Word64X2# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord8X32# :: Word8X32# -> Word8X32# -> Word8X32# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord16X16# :: Word16X16# -> Word16X16# -> Word16X16# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord32X8# :: Word32X8# -> Word32X8# -> Word32X8# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord64X4# :: Word64X4# -> Word64X4# -> Word64X4# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord8X64# :: Word8X64# -> Word8X64# -> Word8X64# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord16X32# :: Word16X32# -> Word16X32# -> Word16X32# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord32X16# :: Word32X16# -> Word32X16# -> Word32X16# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesWord64X8# :: Word64X8# -> Word64X8# -> Word64X8# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesDoubleX2# :: DoubleX2# -> DoubleX2# -> DoubleX2# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesFloatX8# :: FloatX8# -> FloatX8# -> FloatX8# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesDoubleX4# :: DoubleX4# -> DoubleX4# -> DoubleX4# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesFloatX16# :: FloatX16# -> FloatX16# -> FloatX16# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

timesDoubleX8# :: DoubleX8# -> DoubleX8# -> DoubleX8# Source #

Multiply two vectors element-wise.

Warning: this is only available on LLVM.

divideFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# Source #

Divide two vectors element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

divideDoubleX2# :: DoubleX2# -> DoubleX2# -> DoubleX2# Source #

Divide two vectors element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

divideFloatX8# :: FloatX8# -> FloatX8# -> FloatX8# Source #

Divide two vectors element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

divideDoubleX4# :: DoubleX4# -> DoubleX4# -> DoubleX4# Source #

Divide two vectors element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

divideFloatX16# :: FloatX16# -> FloatX16# -> FloatX16# Source #

Divide two vectors element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

divideDoubleX8# :: DoubleX8# -> DoubleX8# -> DoubleX8# Source #

Divide two vectors element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt16X8# :: Int16X8# -> Int16X8# -> Int16X8# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt32X4# :: Int32X4# -> Int32X4# -> Int32X4# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt64X2# :: Int64X2# -> Int64X2# -> Int64X2# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt8X32# :: Int8X32# -> Int8X32# -> Int8X32# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt16X16# :: Int16X16# -> Int16X16# -> Int16X16# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt32X8# :: Int32X8# -> Int32X8# -> Int32X8# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt64X4# :: Int64X4# -> Int64X4# -> Int64X4# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt8X64# :: Int8X64# -> Int8X64# -> Int8X64# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt16X32# :: Int16X32# -> Int16X32# -> Int16X32# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt32X16# :: Int32X16# -> Int32X16# -> Int32X16# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord8X16# :: Word8X16# -> Word8X16# -> Word8X16# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord32X4# :: Word32X4# -> Word32X4# -> Word32X4# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord64X2# :: Word64X2# -> Word64X2# -> Word64X2# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord8X32# :: Word8X32# -> Word8X32# -> Word8X32# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord16X16# :: Word16X16# -> Word16X16# -> Word16X16# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord32X8# :: Word32X8# -> Word32X8# -> Word32X8# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord64X4# :: Word64X4# -> Word64X4# -> Word64X4# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord8X64# :: Word8X64# -> Word8X64# -> Word8X64# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord16X32# :: Word16X32# -> Word16X32# -> Word16X32# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord32X16# :: Word32X16# -> Word32X16# -> Word32X16# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

quotWord64X8# :: Word64X8# -> Word64X8# -> Word64X8# Source #

Rounds towards zero element-wise.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt16X8# :: Int16X8# -> Int16X8# -> Int16X8# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt32X4# :: Int32X4# -> Int32X4# -> Int32X4# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt64X2# :: Int64X2# -> Int64X2# -> Int64X2# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt8X32# :: Int8X32# -> Int8X32# -> Int8X32# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt16X16# :: Int16X16# -> Int16X16# -> Int16X16# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt32X8# :: Int32X8# -> Int32X8# -> Int32X8# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt64X4# :: Int64X4# -> Int64X4# -> Int64X4# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt8X64# :: Int8X64# -> Int8X64# -> Int8X64# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt16X32# :: Int16X32# -> Int16X32# -> Int16X32# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt32X16# :: Int32X16# -> Int32X16# -> Int32X16# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord8X16# :: Word8X16# -> Word8X16# -> Word8X16# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord32X4# :: Word32X4# -> Word32X4# -> Word32X4# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord64X2# :: Word64X2# -> Word64X2# -> Word64X2# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord8X32# :: Word8X32# -> Word8X32# -> Word8X32# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord16X16# :: Word16X16# -> Word16X16# -> Word16X16# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord32X8# :: Word32X8# -> Word32X8# -> Word32X8# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord64X4# :: Word64X4# -> Word64X4# -> Word64X4# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord8X64# :: Word8X64# -> Word8X64# -> Word8X64# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord16X32# :: Word16X32# -> Word16X32# -> Word16X32# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord32X16# :: Word32X16# -> Word32X16# -> Word32X16# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

remWord64X8# :: Word64X8# -> Word64X8# -> Word64X8# Source #

Satisfies (quot# x y) times# y plus# (rem# x y) == x.

Warning: this is only available on LLVM and can fail with an unchecked exception.

negateInt8X16# :: Int8X16# -> Int8X16# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt16X8# :: Int16X8# -> Int16X8# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt32X4# :: Int32X4# -> Int32X4# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt64X2# :: Int64X2# -> Int64X2# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt8X32# :: Int8X32# -> Int8X32# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt16X16# :: Int16X16# -> Int16X16# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt32X8# :: Int32X8# -> Int32X8# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt64X4# :: Int64X4# -> Int64X4# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt8X64# :: Int8X64# -> Int8X64# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt16X32# :: Int16X32# -> Int16X32# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt32X16# :: Int32X16# -> Int32X16# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateInt64X8# :: Int64X8# -> Int64X8# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateFloatX4# :: FloatX4# -> FloatX4# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateDoubleX2# :: DoubleX2# -> DoubleX2# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateFloatX8# :: FloatX8# -> FloatX8# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateDoubleX4# :: DoubleX4# -> DoubleX4# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateFloatX16# :: FloatX16# -> FloatX16# Source #

Negate element-wise.

Warning: this is only available on LLVM.

negateDoubleX8# :: DoubleX8# -> DoubleX8# Source #

Negate element-wise.

Warning: this is only available on LLVM.

indexInt8X16Array# :: ByteArray# -> Int# -> Int8X16# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16X8Array# :: ByteArray# -> Int# -> Int16X8# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32X4Array# :: ByteArray# -> Int# -> Int32X4# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64X2Array# :: ByteArray# -> Int# -> Int64X2# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8X32Array# :: ByteArray# -> Int# -> Int8X32# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16X16Array# :: ByteArray# -> Int# -> Int16X16# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32X8Array# :: ByteArray# -> Int# -> Int32X8# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64X4Array# :: ByteArray# -> Int# -> Int64X4# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8X64Array# :: ByteArray# -> Int# -> Int8X64# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16X32Array# :: ByteArray# -> Int# -> Int16X32# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32X16Array# :: ByteArray# -> Int# -> Int32X16# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64X8Array# :: ByteArray# -> Int# -> Int64X8# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8X16Array# :: ByteArray# -> Int# -> Word8X16# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16X8Array# :: ByteArray# -> Int# -> Word16X8# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32X4Array# :: ByteArray# -> Int# -> Word32X4# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64X2Array# :: ByteArray# -> Int# -> Word64X2# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8X32Array# :: ByteArray# -> Int# -> Word8X32# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16X16Array# :: ByteArray# -> Int# -> Word16X16# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32X8Array# :: ByteArray# -> Int# -> Word32X8# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64X4Array# :: ByteArray# -> Int# -> Word64X4# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8X64Array# :: ByteArray# -> Int# -> Word8X64# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16X32Array# :: ByteArray# -> Int# -> Word16X32# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32X16Array# :: ByteArray# -> Int# -> Word32X16# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64X8Array# :: ByteArray# -> Int# -> Word64X8# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatX4Array# :: ByteArray# -> Int# -> FloatX4# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleX2Array# :: ByteArray# -> Int# -> DoubleX2# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatX8Array# :: ByteArray# -> Int# -> FloatX8# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleX4Array# :: ByteArray# -> Int# -> DoubleX4# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatX16Array# :: ByteArray# -> Int# -> FloatX16# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleX8Array# :: ByteArray# -> Int# -> DoubleX8# Source #

Read a vector from specified index of immutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X16# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X8# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32X4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X4# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64X2Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X2# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8X32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X32# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X16# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X8# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64X4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X4# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8X64Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X64# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16X32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X32# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X16# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X8# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X16# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X8# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32X4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X4# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64X2Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X2# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8X32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X32# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X16# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X8# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64X4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X4# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8X64Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X64# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16X32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X32# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X16# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X8# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatX4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX4# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleX2Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX2# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatX8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX8# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleX4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX4# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatX16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX16# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleX8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX8# #) Source #

Read a vector from specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8X16Array# :: MutableByteArray# d -> Int# -> Int8X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16X8Array# :: MutableByteArray# d -> Int# -> Int16X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32X4Array# :: MutableByteArray# d -> Int# -> Int32X4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64X2Array# :: MutableByteArray# d -> Int# -> Int64X2# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8X32Array# :: MutableByteArray# d -> Int# -> Int8X32# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16X16Array# :: MutableByteArray# d -> Int# -> Int16X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32X8Array# :: MutableByteArray# d -> Int# -> Int32X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64X4Array# :: MutableByteArray# d -> Int# -> Int64X4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8X64Array# :: MutableByteArray# d -> Int# -> Int8X64# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16X32Array# :: MutableByteArray# d -> Int# -> Int16X32# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32X16Array# :: MutableByteArray# d -> Int# -> Int32X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64X8Array# :: MutableByteArray# d -> Int# -> Int64X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8X16Array# :: MutableByteArray# d -> Int# -> Word8X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16X8Array# :: MutableByteArray# d -> Int# -> Word16X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32X4Array# :: MutableByteArray# d -> Int# -> Word32X4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64X2Array# :: MutableByteArray# d -> Int# -> Word64X2# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8X32Array# :: MutableByteArray# d -> Int# -> Word8X32# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16X16Array# :: MutableByteArray# d -> Int# -> Word16X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32X8Array# :: MutableByteArray# d -> Int# -> Word32X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64X4Array# :: MutableByteArray# d -> Int# -> Word64X4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8X64Array# :: MutableByteArray# d -> Int# -> Word8X64# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16X32Array# :: MutableByteArray# d -> Int# -> Word16X32# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32X16Array# :: MutableByteArray# d -> Int# -> Word32X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64X8Array# :: MutableByteArray# d -> Int# -> Word64X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatX4Array# :: MutableByteArray# d -> Int# -> FloatX4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleX2Array# :: MutableByteArray# d -> Int# -> DoubleX2# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatX8Array# :: MutableByteArray# d -> Int# -> FloatX8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleX4Array# :: MutableByteArray# d -> Int# -> DoubleX4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatX16Array# :: MutableByteArray# d -> Int# -> FloatX16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleX8Array# :: MutableByteArray# d -> Int# -> DoubleX8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8X16OffAddr# :: Addr# -> Int# -> Int8X16# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16X8OffAddr# :: Addr# -> Int# -> Int16X8# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32X4OffAddr# :: Addr# -> Int# -> Int32X4# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64X2OffAddr# :: Addr# -> Int# -> Int64X2# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8X32OffAddr# :: Addr# -> Int# -> Int8X32# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16X16OffAddr# :: Addr# -> Int# -> Int16X16# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32X8OffAddr# :: Addr# -> Int# -> Int32X8# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64X4OffAddr# :: Addr# -> Int# -> Int64X4# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8X64OffAddr# :: Addr# -> Int# -> Int8X64# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16X32OffAddr# :: Addr# -> Int# -> Int16X32# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32X16OffAddr# :: Addr# -> Int# -> Int32X16# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64X8OffAddr# :: Addr# -> Int# -> Int64X8# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8X16OffAddr# :: Addr# -> Int# -> Word8X16# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16X8OffAddr# :: Addr# -> Int# -> Word16X8# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32X4OffAddr# :: Addr# -> Int# -> Word32X4# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64X2OffAddr# :: Addr# -> Int# -> Word64X2# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8X32OffAddr# :: Addr# -> Int# -> Word8X32# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16X16OffAddr# :: Addr# -> Int# -> Word16X16# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32X8OffAddr# :: Addr# -> Int# -> Word32X8# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64X4OffAddr# :: Addr# -> Int# -> Word64X4# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8X64OffAddr# :: Addr# -> Int# -> Word8X64# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16X32OffAddr# :: Addr# -> Int# -> Word16X32# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32X16OffAddr# :: Addr# -> Int# -> Word32X16# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64X8OffAddr# :: Addr# -> Int# -> Word64X8# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatX4OffAddr# :: Addr# -> Int# -> FloatX4# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleX2OffAddr# :: Addr# -> Int# -> DoubleX2# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatX8OffAddr# :: Addr# -> Int# -> FloatX8# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleX4OffAddr# :: Addr# -> Int# -> DoubleX4# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatX16OffAddr# :: Addr# -> Int# -> FloatX16# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleX8OffAddr# :: Addr# -> Int# -> DoubleX8# Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int8X16# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int16X8# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32X4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int32X4# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64X2OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int64X2# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8X32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int8X32# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int16X16# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int32X8# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64X4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int64X4# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8X64OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int8X64# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16X32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int16X32# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int32X16# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int64X8# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word8X16# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word16X8# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32X4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word32X4# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64X2OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word64X2# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8X32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word8X32# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word16X16# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word32X8# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64X4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word64X4# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8X64OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word8X64# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16X32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word16X32# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word32X16# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word64X8# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatX4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, FloatX4# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleX2OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX2# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatX8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, FloatX8# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleX4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX4# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatX16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, FloatX16# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleX8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX8# #) Source #

Reads vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8X16OffAddr# :: Addr# -> Int# -> Int8X16# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16X8OffAddr# :: Addr# -> Int# -> Int16X8# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32X4OffAddr# :: Addr# -> Int# -> Int32X4# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64X2OffAddr# :: Addr# -> Int# -> Int64X2# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8X32OffAddr# :: Addr# -> Int# -> Int8X32# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16X16OffAddr# :: Addr# -> Int# -> Int16X16# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32X8OffAddr# :: Addr# -> Int# -> Int32X8# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64X4OffAddr# :: Addr# -> Int# -> Int64X4# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8X64OffAddr# :: Addr# -> Int# -> Int8X64# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16X32OffAddr# :: Addr# -> Int# -> Int16X32# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32X16OffAddr# :: Addr# -> Int# -> Int32X16# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64X8OffAddr# :: Addr# -> Int# -> Int64X8# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8X16OffAddr# :: Addr# -> Int# -> Word8X16# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16X8OffAddr# :: Addr# -> Int# -> Word16X8# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32X4OffAddr# :: Addr# -> Int# -> Word32X4# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64X2OffAddr# :: Addr# -> Int# -> Word64X2# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8X32OffAddr# :: Addr# -> Int# -> Word8X32# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16X16OffAddr# :: Addr# -> Int# -> Word16X16# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32X8OffAddr# :: Addr# -> Int# -> Word32X8# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64X4OffAddr# :: Addr# -> Int# -> Word64X4# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8X64OffAddr# :: Addr# -> Int# -> Word8X64# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16X32OffAddr# :: Addr# -> Int# -> Word16X32# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32X16OffAddr# :: Addr# -> Int# -> Word32X16# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64X8OffAddr# :: Addr# -> Int# -> Word64X8# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatX4OffAddr# :: Addr# -> Int# -> FloatX4# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleX2OffAddr# :: Addr# -> Int# -> DoubleX2# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatX8OffAddr# :: Addr# -> Int# -> FloatX8# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleX4OffAddr# :: Addr# -> Int# -> DoubleX4# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatX16OffAddr# :: Addr# -> Int# -> FloatX16# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleX8OffAddr# :: Addr# -> Int# -> DoubleX8# -> State# d -> State# d Source #

Write vector; offset in bytes.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8ArrayAsInt8X16# :: ByteArray# -> Int# -> Int8X16# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16ArrayAsInt16X8# :: ByteArray# -> Int# -> Int16X8# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32ArrayAsInt32X4# :: ByteArray# -> Int# -> Int32X4# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64ArrayAsInt64X2# :: ByteArray# -> Int# -> Int64X2# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8ArrayAsInt8X32# :: ByteArray# -> Int# -> Int8X32# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16ArrayAsInt16X16# :: ByteArray# -> Int# -> Int16X16# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32ArrayAsInt32X8# :: ByteArray# -> Int# -> Int32X8# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64ArrayAsInt64X4# :: ByteArray# -> Int# -> Int64X4# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8ArrayAsInt8X64# :: ByteArray# -> Int# -> Int8X64# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16ArrayAsInt16X32# :: ByteArray# -> Int# -> Int16X32# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32ArrayAsInt32X16# :: ByteArray# -> Int# -> Int32X16# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64ArrayAsInt64X8# :: ByteArray# -> Int# -> Int64X8# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8ArrayAsWord8X16# :: ByteArray# -> Int# -> Word8X16# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16ArrayAsWord16X8# :: ByteArray# -> Int# -> Word16X8# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32ArrayAsWord32X4# :: ByteArray# -> Int# -> Word32X4# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64ArrayAsWord64X2# :: ByteArray# -> Int# -> Word64X2# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8ArrayAsWord8X32# :: ByteArray# -> Int# -> Word8X32# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16ArrayAsWord16X16# :: ByteArray# -> Int# -> Word16X16# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32ArrayAsWord32X8# :: ByteArray# -> Int# -> Word32X8# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64ArrayAsWord64X4# :: ByteArray# -> Int# -> Word64X4# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8ArrayAsWord8X64# :: ByteArray# -> Int# -> Word8X64# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16ArrayAsWord16X32# :: ByteArray# -> Int# -> Word16X32# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32ArrayAsWord32X16# :: ByteArray# -> Int# -> Word32X16# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64ArrayAsWord64X8# :: ByteArray# -> Int# -> Word64X8# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatArrayAsFloatX4# :: ByteArray# -> Int# -> FloatX4# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleArrayAsDoubleX2# :: ByteArray# -> Int# -> DoubleX2# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatArrayAsFloatX8# :: ByteArray# -> Int# -> FloatX8# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleArrayAsDoubleX4# :: ByteArray# -> Int# -> DoubleX4# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatArrayAsFloatX16# :: ByteArray# -> Int# -> FloatX16# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleArrayAsDoubleX8# :: ByteArray# -> Int# -> DoubleX8# Source #

Read a vector from specified index of immutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8ArrayAsInt8X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X16# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16ArrayAsInt16X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X8# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32ArrayAsInt32X4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X4# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64ArrayAsInt64X2# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X2# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8ArrayAsInt8X32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X32# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16ArrayAsInt16X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X16# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32ArrayAsInt32X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X8# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64ArrayAsInt64X4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X4# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8ArrayAsInt8X64# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X64# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16ArrayAsInt16X32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X32# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32ArrayAsInt32X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X16# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64ArrayAsInt64X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X8# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8ArrayAsWord8X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X16# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16ArrayAsWord16X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X8# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32ArrayAsWord32X4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X4# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64ArrayAsWord64X2# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X2# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8ArrayAsWord8X32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X32# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16ArrayAsWord16X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X16# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32ArrayAsWord32X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X8# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64ArrayAsWord64X4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X4# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8ArrayAsWord8X64# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X64# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16ArrayAsWord16X32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X32# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32ArrayAsWord32X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X16# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64ArrayAsWord64X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X8# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatArrayAsFloatX4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX4# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleArrayAsDoubleX2# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX2# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatArrayAsFloatX8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX8# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleArrayAsDoubleX4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX4# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatArrayAsFloatX16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX16# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleArrayAsDoubleX8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX8# #) Source #

Read a vector from specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8ArrayAsInt8X16# :: MutableByteArray# d -> Int# -> Int8X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16ArrayAsInt16X8# :: MutableByteArray# d -> Int# -> Int16X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32ArrayAsInt32X4# :: MutableByteArray# d -> Int# -> Int32X4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64ArrayAsInt64X2# :: MutableByteArray# d -> Int# -> Int64X2# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8ArrayAsInt8X32# :: MutableByteArray# d -> Int# -> Int8X32# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16ArrayAsInt16X16# :: MutableByteArray# d -> Int# -> Int16X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32ArrayAsInt32X8# :: MutableByteArray# d -> Int# -> Int32X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64ArrayAsInt64X4# :: MutableByteArray# d -> Int# -> Int64X4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8ArrayAsInt8X64# :: MutableByteArray# d -> Int# -> Int8X64# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16ArrayAsInt16X32# :: MutableByteArray# d -> Int# -> Int16X32# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32ArrayAsInt32X16# :: MutableByteArray# d -> Int# -> Int32X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64ArrayAsInt64X8# :: MutableByteArray# d -> Int# -> Int64X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8ArrayAsWord8X16# :: MutableByteArray# d -> Int# -> Word8X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16ArrayAsWord16X8# :: MutableByteArray# d -> Int# -> Word16X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32ArrayAsWord32X4# :: MutableByteArray# d -> Int# -> Word32X4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64ArrayAsWord64X2# :: MutableByteArray# d -> Int# -> Word64X2# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8ArrayAsWord8X32# :: MutableByteArray# d -> Int# -> Word8X32# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16ArrayAsWord16X16# :: MutableByteArray# d -> Int# -> Word16X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32ArrayAsWord32X8# :: MutableByteArray# d -> Int# -> Word32X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64ArrayAsWord64X4# :: MutableByteArray# d -> Int# -> Word64X4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8ArrayAsWord8X64# :: MutableByteArray# d -> Int# -> Word8X64# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16ArrayAsWord16X32# :: MutableByteArray# d -> Int# -> Word16X32# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32ArrayAsWord32X16# :: MutableByteArray# d -> Int# -> Word32X16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64ArrayAsWord64X8# :: MutableByteArray# d -> Int# -> Word64X8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatArrayAsFloatX4# :: MutableByteArray# d -> Int# -> FloatX4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleArrayAsDoubleX2# :: MutableByteArray# d -> Int# -> DoubleX2# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatArrayAsFloatX8# :: MutableByteArray# d -> Int# -> FloatX8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleArrayAsDoubleX4# :: MutableByteArray# d -> Int# -> DoubleX4# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatArrayAsFloatX16# :: MutableByteArray# d -> Int# -> FloatX16# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleArrayAsDoubleX8# :: MutableByteArray# d -> Int# -> DoubleX8# -> State# d -> State# d Source #

Write a vector to specified index of mutable array of scalars; offset is in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8OffAddrAsInt8X16# :: Addr# -> Int# -> Int8X16# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16OffAddrAsInt16X8# :: Addr# -> Int# -> Int16X8# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32OffAddrAsInt32X4# :: Addr# -> Int# -> Int32X4# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64OffAddrAsInt64X2# :: Addr# -> Int# -> Int64X2# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8OffAddrAsInt8X32# :: Addr# -> Int# -> Int8X32# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16OffAddrAsInt16X16# :: Addr# -> Int# -> Int16X16# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32OffAddrAsInt32X8# :: Addr# -> Int# -> Int32X8# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64OffAddrAsInt64X4# :: Addr# -> Int# -> Int64X4# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt8OffAddrAsInt8X64# :: Addr# -> Int# -> Int8X64# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt16OffAddrAsInt16X32# :: Addr# -> Int# -> Int16X32# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt32OffAddrAsInt32X16# :: Addr# -> Int# -> Int32X16# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexInt64OffAddrAsInt64X8# :: Addr# -> Int# -> Int64X8# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8OffAddrAsWord8X16# :: Addr# -> Int# -> Word8X16# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16OffAddrAsWord16X8# :: Addr# -> Int# -> Word16X8# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32OffAddrAsWord32X4# :: Addr# -> Int# -> Word32X4# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64OffAddrAsWord64X2# :: Addr# -> Int# -> Word64X2# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8OffAddrAsWord8X32# :: Addr# -> Int# -> Word8X32# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16OffAddrAsWord16X16# :: Addr# -> Int# -> Word16X16# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32OffAddrAsWord32X8# :: Addr# -> Int# -> Word32X8# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64OffAddrAsWord64X4# :: Addr# -> Int# -> Word64X4# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord8OffAddrAsWord8X64# :: Addr# -> Int# -> Word8X64# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord16OffAddrAsWord16X32# :: Addr# -> Int# -> Word16X32# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord32OffAddrAsWord32X16# :: Addr# -> Int# -> Word32X16# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexWord64OffAddrAsWord64X8# :: Addr# -> Int# -> Word64X8# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatOffAddrAsFloatX4# :: Addr# -> Int# -> FloatX4# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleOffAddrAsDoubleX2# :: Addr# -> Int# -> DoubleX2# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatOffAddrAsFloatX8# :: Addr# -> Int# -> FloatX8# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleOffAddrAsDoubleX4# :: Addr# -> Int# -> DoubleX4# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexFloatOffAddrAsFloatX16# :: Addr# -> Int# -> FloatX16# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

indexDoubleOffAddrAsDoubleX8# :: Addr# -> Int# -> DoubleX8# Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8OffAddrAsInt8X16# :: Addr# -> Int# -> State# d -> (# State# d, Int8X16# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16OffAddrAsInt16X8# :: Addr# -> Int# -> State# d -> (# State# d, Int16X8# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32OffAddrAsInt32X4# :: Addr# -> Int# -> State# d -> (# State# d, Int32X4# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64OffAddrAsInt64X2# :: Addr# -> Int# -> State# d -> (# State# d, Int64X2# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8OffAddrAsInt8X32# :: Addr# -> Int# -> State# d -> (# State# d, Int8X32# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16OffAddrAsInt16X16# :: Addr# -> Int# -> State# d -> (# State# d, Int16X16# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32OffAddrAsInt32X8# :: Addr# -> Int# -> State# d -> (# State# d, Int32X8# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64OffAddrAsInt64X4# :: Addr# -> Int# -> State# d -> (# State# d, Int64X4# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt8OffAddrAsInt8X64# :: Addr# -> Int# -> State# d -> (# State# d, Int8X64# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt16OffAddrAsInt16X32# :: Addr# -> Int# -> State# d -> (# State# d, Int16X32# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt32OffAddrAsInt32X16# :: Addr# -> Int# -> State# d -> (# State# d, Int32X16# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readInt64OffAddrAsInt64X8# :: Addr# -> Int# -> State# d -> (# State# d, Int64X8# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8OffAddrAsWord8X16# :: Addr# -> Int# -> State# d -> (# State# d, Word8X16# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16OffAddrAsWord16X8# :: Addr# -> Int# -> State# d -> (# State# d, Word16X8# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32OffAddrAsWord32X4# :: Addr# -> Int# -> State# d -> (# State# d, Word32X4# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64OffAddrAsWord64X2# :: Addr# -> Int# -> State# d -> (# State# d, Word64X2# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8OffAddrAsWord8X32# :: Addr# -> Int# -> State# d -> (# State# d, Word8X32# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16OffAddrAsWord16X16# :: Addr# -> Int# -> State# d -> (# State# d, Word16X16# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32OffAddrAsWord32X8# :: Addr# -> Int# -> State# d -> (# State# d, Word32X8# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64OffAddrAsWord64X4# :: Addr# -> Int# -> State# d -> (# State# d, Word64X4# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord8OffAddrAsWord8X64# :: Addr# -> Int# -> State# d -> (# State# d, Word8X64# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord16OffAddrAsWord16X32# :: Addr# -> Int# -> State# d -> (# State# d, Word16X32# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord32OffAddrAsWord32X16# :: Addr# -> Int# -> State# d -> (# State# d, Word32X16# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readWord64OffAddrAsWord64X8# :: Addr# -> Int# -> State# d -> (# State# d, Word64X8# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatOffAddrAsFloatX4# :: Addr# -> Int# -> State# d -> (# State# d, FloatX4# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleOffAddrAsDoubleX2# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX2# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatOffAddrAsFloatX8# :: Addr# -> Int# -> State# d -> (# State# d, FloatX8# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleOffAddrAsDoubleX4# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX4# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readFloatOffAddrAsFloatX16# :: Addr# -> Int# -> State# d -> (# State# d, FloatX16# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

readDoubleOffAddrAsDoubleX8# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX8# #) Source #

Reads vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8OffAddrAsInt8X16# :: Addr# -> Int# -> Int8X16# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16OffAddrAsInt16X8# :: Addr# -> Int# -> Int16X8# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32OffAddrAsInt32X4# :: Addr# -> Int# -> Int32X4# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64OffAddrAsInt64X2# :: Addr# -> Int# -> Int64X2# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8OffAddrAsInt8X32# :: Addr# -> Int# -> Int8X32# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16OffAddrAsInt16X16# :: Addr# -> Int# -> Int16X16# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32OffAddrAsInt32X8# :: Addr# -> Int# -> Int32X8# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64OffAddrAsInt64X4# :: Addr# -> Int# -> Int64X4# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt8OffAddrAsInt8X64# :: Addr# -> Int# -> Int8X64# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt16OffAddrAsInt16X32# :: Addr# -> Int# -> Int16X32# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt32OffAddrAsInt32X16# :: Addr# -> Int# -> Int32X16# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeInt64OffAddrAsInt64X8# :: Addr# -> Int# -> Int64X8# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8OffAddrAsWord8X16# :: Addr# -> Int# -> Word8X16# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16OffAddrAsWord16X8# :: Addr# -> Int# -> Word16X8# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32OffAddrAsWord32X4# :: Addr# -> Int# -> Word32X4# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64OffAddrAsWord64X2# :: Addr# -> Int# -> Word64X2# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8OffAddrAsWord8X32# :: Addr# -> Int# -> Word8X32# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16OffAddrAsWord16X16# :: Addr# -> Int# -> Word16X16# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32OffAddrAsWord32X8# :: Addr# -> Int# -> Word32X8# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64OffAddrAsWord64X4# :: Addr# -> Int# -> Word64X4# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord8OffAddrAsWord8X64# :: Addr# -> Int# -> Word8X64# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord16OffAddrAsWord16X32# :: Addr# -> Int# -> Word16X32# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord32OffAddrAsWord32X16# :: Addr# -> Int# -> Word32X16# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeWord64OffAddrAsWord64X8# :: Addr# -> Int# -> Word64X8# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatOffAddrAsFloatX4# :: Addr# -> Int# -> FloatX4# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleOffAddrAsDoubleX2# :: Addr# -> Int# -> DoubleX2# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatOffAddrAsFloatX8# :: Addr# -> Int# -> FloatX8# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleOffAddrAsDoubleX4# :: Addr# -> Int# -> DoubleX4# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeFloatOffAddrAsFloatX16# :: Addr# -> Int# -> FloatX16# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

writeDoubleOffAddrAsDoubleX8# :: Addr# -> Int# -> DoubleX8# -> State# d -> State# d Source #

Write vector; offset in scalar elements.

Warning: this is only available on LLVM and can fail with an unchecked exception.

Prefetch

Prefetch operations: Note how every prefetch operation has a name with the pattern prefetch*N#, where N is either 0,1,2, or 3.

This suffix number, N, is the "locality level" of the prefetch, following the convention in GCC and other compilers. Higher locality numbers correspond to the memory being loaded in more levels of the cpu cache, and being retained after initial use. The naming convention follows the naming convention of the prefetch intrinsic found in the GCC and Clang C compilers.

On the LLVM backend, prefetch*N# uses the LLVM prefetch intrinsic with locality level N. The code generated by LLVM is target architecture dependent, but should agree with the GHC NCG on x86 systems.

On the PPC native backend, prefetch*N is a No-Op.

On the x86 NCG, N=0 will generate prefetchNTA, N=1 generates prefetcht2, N=2 generates prefetcht1, and N=3 generates prefetcht0.

For streaming workloads, the prefetch*0 operations are recommended. For workloads which do many reads or writes to a memory location in a short period of time, prefetch*3 operations are recommended.

For further reading about prefetch and associated systems performance optimization, the instruction set and optimization manuals by Intel and other CPU vendors are excellent starting place.

The "Intel 64 and IA-32 Architectures Optimization Reference Manual" is especially a helpful read, even if your software is meant for other CPU architectures or vendor hardware. The manual can be found at http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-optimization-manual.html .

The prefetch* family of operations has the order of operations determined by passing around the State# token.

To get a "pure" version of these operations, use inlinePerformIO which is quite safe in this context.

It is important to note that while the prefetch operations will never change the answer to a pure computation, They CAN change the memory locations resident in a CPU cache and that may change the performance and timing characteristics of an application. The prefetch operations are marked has_side_effects=True to reflect that these operations have side effects with respect to the runtime performance characteristics of the resulting code. Additionally, if the prefetchValue operations did not have this attribute, GHC does a float out transformation that results in a let-can-float invariant violation, at least with the current design.

RuntimeRep polymorphism in continuation-style primops

Several primops provided by GHC accept continuation arguments with highly polymorphic arguments. For instance, consider the type of catch#:

catch# :: forall (r_rep :: RuntimeRep) (r :: TYPE r_rep) w. (State# RealWorld -> (# State# RealWorld, r #) ) -> (w -> State# RealWorld -> (# State# RealWorld, r #) ) -> State# RealWorld -> (# State# RealWorld, r #)

This type suggests that we could instantiate catch# continuation argument (namely, the first argument) with something like,

f :: State# RealWorld -> (# State# RealWorld, (# Int, String, Int8# #) #)

However, sadly the type does not capture an important limitation of the primop. Specifically, due to the operational behavior of catch# the result type must be representable with a single machine word. In a future GHC release we may improve the precision of this type to capture this limitation.

See #21868.