Dx      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw  non-portable'Roman Leshchinskiy <rl@cse.unsw.edu.au> Safe-Inferredxyxx non-portable'Roman Leshchinskiy <rl@cse.unsw.edu.au>None"  !"#$"  !"#$"$#"!  "  !"#$  non-portable'Roman Leshchinskiy <rl@cse.unsw.edu.au>Nonez{|}~z{|}~z{|}~ non-portable'Roman Leshchinskiy <rl@cse.unsw.edu.au>None %,Class of primitive state-transformer monads &State token type 'Execute a primitive operation (+Expose the internal structure of the monad )-Execute a primitive operation with no result * Convert a %- to another monad with the same state token. + Convert a % with a  state token to  , Convert a % to  - Convert a %2 to another monad with a possibly different state ) token. This operation is highly unsafe! . Convert any % to % with an arbitrary state token. This  operation is highly unsafe! / Convert any % to #. This operation is highly unsafe! %&'()*+,-./0123%&'()*+,-./0123%&'()*+,-/.0123%&'()*+,-./0123 non-portable'Roman Leshchinskiy <rl@cse.unsw.edu.au>None 45Class of types supporting primitive array operations 5Size of values of type a. The argument is not used. 6Alignment of values of type a. The argument is not used. 7?Read a value from the array. The offset is in elements of type  a rather than in bytes. 8GRead a value from the mutable array. The offset is in elements of type  a rather than in bytes. 9FWrite a value to the mutable array. The offset is in elements of type  a rather than in bytes. :FFill a slice of the mutable array with a value. The offset and length & of the chunk are in elements of type a rather than in bytes. ;GRead a value from a memory position given by an address and an offset. L The memory block the address refers to must be immutable. The offset is in  elements of type a rather than in bytes. <GRead a value from a memory position given by an address and an offset. # The offset is in elements of type a rather than in bytes. =FWrite a value to a memory position given by an address and an offset. # The offset is in elements of type a rather than in bytes. >AFill a memory block given by an address, an offset and a length. / The offset and length are in elements of type a rather than in bytes. ?A machine address 456789:;<=>?@ 456789:;<=>?@ 456789:;<=>?@4 56789:;<=>?@ non-portable'Roman Leshchinskiy <rl@cse.unsw.edu.au>None A>Mutable boxed arrays associated with a primitive state token. C Boxed arrays EDCreate a new mutable array of the specified size and initialise all  elements with the given value. F0Read a value from the array at the given index. G/Write a value to the array at the given index. H:Read a value from the immutable array at the given index. IFMonadically read a value from the immutable array at the given index. K This allows us to be strict in the array while remaining lazy in the read L element which is very useful for collective operations. Suppose we want to 1 copy an array. We could do something like this:   copy marr arr ... = do ... A writeArray marr i (indexArray arr i) ...  ... 2But since primitive arrays are lazy, the calls to H will not be  evaluated. Rather, marr0 will be filled with thunks each of which would  retain a reference to arr'. This is definitely not what we want! With I, we can instead write   copy marr arr ... = do ... / x <- indexArrayM arr i , writeArray marr i x  ... GNow, indexing is executed immediately although the returned element is  still not evaluated. JAConvert a mutable array to an immutable one without copying. The 4 array should not be modified after the conversion. KBConvert an immutable array to an mutable one without copying. The : immutable array should not be used after the conversion. L=Check whether the two arrays refer to the same memory block. M7Copy a slice of an immutable array to a mutable array. NECopy a slice of a mutable array to another array. The two arrays may  not be the same. ABCDEFGHIJKLMdestination array offset into destination array  source array offset into source array number of elements to copy Ndestination array offset into destination array  source array offset into source array number of elements to copy ABCDEFGHIJKLMNCDABEFGHIJKLMNABCDEFGHIJKLMN non-portable'Roman Leshchinskiy <rl@cse.unsw.edu.au>NoneO<Mutable byte arrays associated with a primitive state token Q Byte arrays S7Create a new mutable byte array of the specified size. T Create a pinned9 byte array of the specified size. The garbage collector  is guaranteed not to move it. U Create a pinned4 byte array of the specified size and with the give @ alignment. The garbage collector is guaranteed not to move it. VYield a pointer to the array''s data. This operation is only safe on  pinned byte arrays allocated by T or  U. WYield a pointer to the array''s data. This operation is only safe on  pinned byte arrays allocated by T or  U. X8Check if the two arrays refer to the same memory block. YFConvert a mutable byte array to an immutable one without copying. The 4 array should not be modified after the conversion. ZFConvert an immutable byte array to a mutable one without copying. The 9 original array should not be used after the conversion. [Size of the byte array. \ Size of the mutable byte array. ]CRead a primitive value from the byte array. The offset is given in  elements of type a rather than in bytes. ^CRead a primitive value from the byte array. The offset is given in  elements of type a rather than in bytes. _BWrite a primitive value to the byte array. The offset is given in  elements of type a rather than in bytes. `ACopy a slice of an immutable byte array to a mutable byte array. aHCopy a slice of a mutable byte array into another array. The two slices  may not overlap. b?Copy a slice of a mutable byte array into another, potentially  overlapping array. cIFill a slice of a mutable byte array with a value. The offset and length  are given in elements of type a rather than in bytes. d2Fill a slice of a mutable byte array with a byte. OPQRSTUVWXYZ[\]^_`destination array offset into destination array  source array offset into source array number of bytes to copy adestination array offset into destination array  source array offset into source array number of bytes to copy bdestination array offset into destination array  source array offset into source array number of bytes to copy carray to fill offset into array number of values to fill value to fill with darray to fill offset into array number of bytes to fill byte to fill with OPQRSTUVWXYZ[\]^_`abcdQROPSTU^_]YZ`abcd[\XVWOPQRSTUVWXYZ[\]^_`abcd non-portable'Roman Leshchinskiy <rl@cse.unsw.edu.au>None eThe null address f/Offset an address by the given number of bytes gIDistance in bytes between two addresses. The result is only valid if the  difference fits in an . h.The remainder of the address and the integer. iGRead a value from a memory position given by an address and an offset. L The memory block the address refers to must be immutable. The offset is in  elements of type a rather than in bytes. jGRead a value from a memory position given by an address and an offset. # The offset is in elements of type a rather than in bytes. kFWrite a value to a memory position given by an address and an offset. # The offset is in elements of type a rather than in bytes. l/Copy the given number of bytes from the second ? to the first. The  areas may not overlap. m/Copy the given number of bytes from the second ? to the first. The  areas may overlap. n>Fill a memory block of with the given value. The length is in  elements of type a rather than in bytes. efghijkldestination address source address number of bytes mdestination address source address number of bytes n ?@efghijklmn ?@efghijklmn efghijklmn non-portable'Roman Leshchinskiy <rl@cse.unsw.edu.au>NoneoSize of values of type a. The argument is not used. pAlignment of values of type a. The argument is not used. op?456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopopop non-portable'Roman Leshchinskiy <rl@cse.unsw.edu.au>NoneqA q8 behaves like a single-element mutable array associated  with a primitive state token. s Create a new q" with the specified initial value tRead the value of a q uWrite a new value into a q v$Atomically mutate the contents of a q wMutate the contents of a q qrstuvwqrstuvwqrstuvwqrstuvw    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLLMMNNOPQRSTUVWXYYZZ[\]^_`abcdefghijklmnopqrstuvwxyyz{|}~   primitive-0.5.1.0Data.Primitive.ByteArrayControl.Monad.PrimitiveData.Primitive.MachDepsData.Primitive.TypesData.Primitive.ArrayData.Primitive.AddrData.PrimitiveData.Primitive.MutVarData.Primitive.Internal.Compat"Data.Primitive.Internal.Operationsghc-primGHC.Prim ByteArray#MutableByteArray# RealWorldInt64_#Word64_# sIZEOF_CHARaLIGNMENT_CHAR sIZEOF_INT aLIGNMENT_INT sIZEOF_WORDaLIGNMENT_WORD sIZEOF_DOUBLEaLIGNMENT_DOUBLE sIZEOF_FLOATaLIGNMENT_FLOAT sIZEOF_PTR aLIGNMENT_PTR sIZEOF_FUNPTRaLIGNMENT_FUNPTRsIZEOF_STABLEPTRaLIGNMENT_STABLEPTR sIZEOF_INT8aLIGNMENT_INT8 sIZEOF_WORD8aLIGNMENT_WORD8 sIZEOF_INT16aLIGNMENT_INT16 sIZEOF_WORD16aLIGNMENT_WORD16 sIZEOF_INT32aLIGNMENT_INT32 sIZEOF_WORD32aLIGNMENT_WORD32 sIZEOF_INT64aLIGNMENT_INT64 sIZEOF_WORD64aLIGNMENT_WORD64 PrimMonad PrimState primitiveinternal primitive_ primToPrimprimToIOprimToSTunsafePrimToPrimunsafePrimToSTunsafePrimToIOunsafeInlinePrimunsafeInlineIOunsafeInlineSTtouchPrimsizeOf# alignment#indexByteArray#readByteArray#writeByteArray# setByteArray# indexOffAddr# readOffAddr# writeOffAddr# setOffAddr#Addr MutableArrayArraynewArray readArray writeArray indexArray indexArrayMunsafeFreezeArrayunsafeThawArraysameMutableArray copyArraycopyMutableArrayMutableByteArray ByteArray newByteArraynewPinnedByteArraynewAlignedPinnedByteArraybyteArrayContentsmutableByteArrayContentssameMutableByteArrayunsafeFreezeByteArrayunsafeThawByteArraysizeofByteArraysizeofMutableByteArrayindexByteArray readByteArraywriteByteArray copyByteArraycopyMutableByteArray moveByteArray setByteArray fillByteArraynullAddrplusAddr minusAddrremAddr indexOffAddr readOffAddr writeOffAddrcopyAddrmoveAddrsetAddrsizeOf alignmentMutVar newMutVar readMutVar writeMutVaratomicModifyMutVar modifyMutVarisTrue#base Data.Data mkNoRepTypesetWideCharOffAddr#setDoubleOffAddr#setFloatOffAddr#setAddrOffAddr#setIntOffAddr#setInt64OffAddr#setInt32OffAddr#setInt16OffAddr#setInt8OffAddr#setWordOffAddr#setWord64OffAddr#setWord32OffAddr#setWord16OffAddr#setWord8OffAddr#setWideCharArray#setDoubleArray#setFloatArray# setAddrArray# setIntArray#setInt64Array#setInt32Array#setInt16Array# setInt8Array# setWordArray#setWord64Array#setWord32Array#setWord16Array#setWord8Array# GHC.TypesIOGHC.STST $fPrimMonadST $fPrimMonadIOunI# $fPrimAddr $fPrimChar $fPrimDouble $fPrimFloat $fPrimInt64 $fPrimInt32 $fPrimInt16 $fPrimInt8 $fPrimInt $fPrimWord64 $fPrimWord32 $fPrimWord16 $fPrimWord8 $fPrimWord $fDataAddr $fOrdAddr$fEqAddr$fDataMutableArray $fDataArray memmove_mba memcpy_ba memcpy_mbai#$fDataMutableByteArray$fDataByteArrayInt $fEqMutVar