!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~              (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNoneB"  !"#$%&"  !"#$%&"  !"#$%&"  !"#$%&  (c) Roman Leshchinskiy 2011-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone B   !"#$%&'   !"#$%&'   !"#$%&'  (c) Roman Leshchinskiy 2011-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNoneB()(c) Roman Leshchinskiy 2009 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone 9:;BDRT'8Class of primitive monads for state-transformer actions.Unlike )#, this typeclass requires that the Monadp be fully expressed as a state transformer, therefore disallowing other monad transformers on top of the base IO or ST.(*Expose the internal structure of the monad)EClass of monads which can perform primitive state-transformer actions*State token type+Execute a primitive operation,,Execute a primitive operation with no result-Lifts a ' into another ), with the same underlying state token type.. Convert a ', to another monad with the same state token./ Convert a ' with a  state token to *0 Convert a ' to +1 Convert an * action to a ).2 Convert an + action to a ).3 Convert a 'Z to another monad with a possibly different state token. This operation is highly unsafe!4 Convert any ' to +A with an arbitrary state token. This operation is highly unsafe!5 Convert any ' to *". This operation is highly unsafe!6 Convert an +- action with an arbitraty state token to any )#. This operation is highly unsafe!7 Convert an * action to any )#. This operation is highly unsafe!</Create an action to force a value; generalizes  ''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM'()*+,-./0123456789:;<)*+,'(-./0123547689:;<$'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone 0BDORTN=Mutable boxed arrays associated with a primitive state token.Q Boxed arraysVcCreate a new mutable array of the specified size and initialise all elements with the given value.W/Read a value from the array at the given index.X.Write a value to the array at the given index.Y9Read a value from the immutable array at the given index.Z Monadically read a value from the immutable array at the given index. This allows us to be strict in the array while remaining lazy in the read element which is very useful for collective operations. Suppose we want to copy an array. We could do something like this: ucopy marr arr ... = do ... writeArray marr i (indexArray arr i) ... ...2But since primitive arrays are lazy, the calls to Y! will not be evaluated. Rather, marrG will be filled with thunks each of which would retain a reference to arr&. This is definitely not what we want!With Z, we can instead write copy marr arr ... = do ... x <- indexArrayM arr i writeArray marr i x ...\Now, indexing is executed immediately although the returned element is still not evaluated.[0Create an immutable copy of a slice of an array.sThis operation makes a copy of the specified section, so it is safe to continue using the mutable array afterward.\tConvert a mutable array to an immutable one without copying. The array should not be modified after the conversion.]:Create a mutable array from a slice of an immutable array.hThis operation makes a copy of the specified slice, so it is safe to use the immutable array afterward.^{Convert an immutable array to an mutable one without copying. The immutable array should not be used after the conversion._<Check whether the two arrays refer to the same memory block.`6Copy a slice of an immutable array to a mutable array.aVCopy a slice of a mutable array to another array. The two arrays may not be the same.bReturn a newly allocated Array with the specified subrange of the provided Array. The provided Array should contain the full subrange specified by the two Ints, but this is not checked.cReturn a newly allocated MutableArray. with the specified subrange of the provided MutableArray. The provided MutableArray should contain the full subrange specified by the two Ints, but this is not checked..NOPQRSTUVWXYZ[sourceoffsetlength\]sourceoffsetlength^_`destination arrayoffset into destination array source arrayoffset into source arraynumber of elements to copyadestination arrayoffset into destination array source arrayoffset into source arraynumber of elements to copyb source arrayoffset into destination arraynumber of elements to copyc source arrayoffset into destination arraynumber of elements to copy,-./01defghijklmnopqrstuNOPQRSTUVWXYZ[\]^_`abcQRSNOPVWXYZ[]\^_`abcTU*NOPQRSTUVWXYZ[\]^_`abc,-./01defghijklmnopqrstu4(c) Justin Bonnar 2011, Roman Leshchinskiy 2011-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone0BvA vV behaves like a single-element mutable array associated with a primitive state token.x Create a new v! with the specified initial valueyRead the value of a vzWrite a new value into a v{$Atomically mutate the contents of a v|Strict version of {,. This forces both the value stored in the v as well as the value returned.}Mutate the contents of a v~Strict version of } vwxyz{|}~ vwxyz{|}~ vwxyz{|}~ vwxyz{|}~(c) 2015 Dan DoelBSD3libraries@haskell.org non-portableNone0234BDIORT !Create a new small mutable array.5Read the element at a given index in a mutable array.6Write an element at the given idex in a mutable array.)Look up an element in an immutable array.7The purpose of returning a result using a monad is to allow the caller to avoid retaining references to the array. Evaluating the return value will cause the array lookup to be performed, even though it may not require the element of the array to be evaluated (which could throw an exception). For instance: Kdata Box a = Box a ... f sa = case indexSmallArrayM sa 0 of Box x -> ...x" is not a closure that references sa% as it would be if we instead wrote: let x = indexSmallArray sa 0And does not prevent sa from being garbage collected. Note that 2k is not adequate for this use, as it is a newtype, and cannot be evaluated without evaluating the element.)Look up an element in an immutable array./Create a copy of a slice of an immutable array.,Create a copy of a slice of a mutable array.FCreate an immutable array corresponding to a slice of a mutable array.<This operation copies the portion of the array to be frozen.!Render a mutable array immutable.hThis operation performs no copying, so care must be taken not to modify the input array after freezing.FCreate a mutable array corresponding to a slice of an immutable array.<This operation copies the portion of the array to be thawed."Render an immutable array mutable.GThis operation performs no copying, so care must be taken with its use.8Copy a slice of an immutable array into a mutable array./Copy a slice of one mutable array into another.-sizeinitial contentsarrayindexarrayindex new elementarrayindexarrayindexsourceoffsetlengthsourceoffsetlengthsourceoffsetlengthsourceoffsetlength destinationdestination offsetsource source offsetlength destinationdestination offsetsource source offsetlength3456789:+3456789:61 (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone0B 4Class of types supporting primitive array operationsSize of values of type a. The argument is not used.Alignment of values of type a. The argument is not used.@Read a value from the array. The offset is in elements of type a rather than in bytes.HRead a value from the mutable array. The offset is in elements of type a rather than in bytes.GWrite a value to the mutable array. The offset is in elements of type a rather than in bytes.lFill 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.Read a value from a memory position given by an address and an offset. The memory block the address refers to must be immutable. The offset is in elements of type a rather than in bytes.jRead 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.iWrite 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.pFill 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!;  ; (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNoneB The null address.Offset an address by the given number of bytes`Distance in bytes between two addresses. The result is only valid if the difference fits in an <.-The remainder of the address and the integer.Read a value from a memory position given by an address and an offset. The memory block the address refers to must be immutable. The offset is in elements of type a rather than in bytes.jRead 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.iWrite 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./Copy the given number of bytes from the second * to the first. The areas may not overlap./Copy the given number of bytes from the second & to the first. The areas may overlap.PFill a memory block of with the given value. The length is in elements of type a rather than in bytes. destination addresssource addressnumber of bytesdestination addresssource addressnumber of bytes 667 (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone 0B;Mutable byte arrays associated with a primitive state token Byte arrays6Create a new mutable byte array of the specified size. Create a pinnedW byte array of the specified size. The garbage collector is guaranteed not to move it. Create a pinneds byte array of the specified size and with the give alignment. The garbage collector is guaranteed not to move it.EYield a pointer to the array's data. This operation is only safe on pinned byte arrays allocated by  or .EYield a pointer to the array's data. This operation is only safe on pinned byte arrays allocated by  or .7Check if the two arrays refer to the same memory block.yConvert a mutable byte array to an immutable one without copying. The array should not be modified after the conversion.~Convert an immutable byte array to a mutable one without copying. The original array should not be used after the conversion.Size of the byte array.Size of the mutable byte array.URead a primitive value from the byte array. The offset is given in elements of type a rather than in bytes.URead a primitive value from the byte array. The offset is given in elements of type a rather than in bytes.TWrite a primitive value to the byte array. The offset is given in elements of type a rather than in bytes.@Copy a slice of an immutable byte array to a mutable byte array.YCopy a slice of a mutable byte array into another array. The two slices may not overlap.RCopy a slice of a mutable byte array into another, potentially overlapping array.hFill 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.1Fill a slice of a mutable byte array with a byte.=>destination arrayoffset into destination array source arrayoffset into source arraynumber of bytes to copydestination arrayoffset into destination array source arrayoffset into source arraynumber of bytes to copydestination arrayoffset into destination array source arrayoffset into source arraynumber of bytes to copy array to filloffset into arraynumber of values to fillvalue to fill with array to filloffset into arraynumber of bytes to fillbyte to fill with=>  (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNoneBSize of values of type a. The argument is not used.Alignment of values of type a. The argument is not used.INOPQRSTUVWXYZ[\]^_`abc (c) Dan Doel 2016 BSD-style!Libraries <libraries@haskell.org> non-portableNone0B3Classifies the types that are able to be stored in  and . These should be types that are just liftings of the unlifted pointer types, so that their internal contents can be safely coerced into an ?.Mutable arrays that efficiently store types that are simple wrappers around unlifted primitive types. The values of the unlifted type are stored directly, eliminating a layer of indirection.Immutable arrays that efficiently store types that are simple wrappers around unlifted primitive types. The values of the unlifted type are stored directly, eliminating a layer of indirection.Creates a new [. This function is unsafe, because it allows access to the raw contents of the underlying ?.DSets all the positions in an unlifted array to the designated value.Creates a new D with the specified value as initial contents. This is slower than  , but safer.Yields the length of an .Yields the length of a ./Gets the value at the specified position of an ./Gets the value at the specified position of an . The purpose of the @% is to allow for being eager in the S value without having to introduce a data dependency directly on the result value.KIt should be noted that this is not as much of a problem as with a normal Q, because elements of an  are guaranteed to not be exceptional. This function is provided in case it is more desirable than being strict in the result value..Gets the value at the specified position of a ..Sets the value at the specified position of a . Freezes a , yielding an . This simply marks the array as frozen in place, so it should only be used when no further modifications to the mutable array will be performed.Determines whether two R values are the same. This is object/pointer identity, not based on the contents.?Copies the contents of an immutable array into a mutable array.6Copies the contents of one mutable array into another.Freezes a portion of a , yielding an }. This operation is safe, in that it copies the frozen portion, and the existing mutable array may still be used afterward.Thaws a portion of an  , yielding a T. This copies the thawed portion, so mutations will not affect the original array."Creates a copy of a portion of an Creates a new : containing a copy of a portion of another mutable array.$size destinationvalue to fill withsize initial valueAsourceindexsourceindexsourceindex destinationindexvalue destinationoffset into destinationsourceoffset into sourcenumber of elements to copy destinationoffset into destinationsourceoffset into sourcenumber of elements to copysourceoffsetlengthsourceoffsetlengthsourceoffsetlengthsourceoffsetlength    A   B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`aabccdefghijklmnopqrstuvwxyz{|}~                                       ! " # $ % & ' ( ) * + , - . / 01234356789:;<=>?:@ABC;D=E3FGEHIJ KL(primitive-0.6.2.0-3HSsNCfUEEE4fjqDYVydYZData.Primitive.ArrayData.Primitive.ByteArrayControl.Monad.PrimitiveData.Primitive.MachDepsData.Primitive.MutVarData.Primitive.SmallArrayData.Primitive.TypesData.Primitive.AddrData.PrimitiveData.Primitive.UnliftedArray"Data.Primitive.Internal.OperationsData.Primitive.Internal.CompatControl.ExceptionevaluatebaseGHC.ExtsfromList fromListNghc-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_WORD64PrimBaseinternal PrimMonad PrimState primitive primitive_liftPrim primToPrimprimToIOprimToSTioToPrimstToPrimunsafePrimToPrimunsafePrimToSTunsafePrimToIOunsafeSTToPrimunsafeIOToPrimunsafeInlinePrimunsafeInlineIOunsafeInlineSTtouchevalPrim $fPrimBaseST $fPrimMonadST$fPrimMonadRWST$fPrimMonadWriterT$fPrimMonadStateT$fPrimMonadExceptT$fPrimMonadRWST0$fPrimMonadWriterT0$fPrimMonadStateT0$fPrimMonadReaderT$fPrimMonadErrorT$fPrimMonadMaybeT$fPrimMonadListT$fPrimBaseIdentityT$fPrimMonadIdentityT $fPrimBaseIO $fPrimMonadIO MutableArraymarray#Arrayarray# sizeofArraysizeofMutableArraynewArray readArray writeArray indexArray indexArrayM freezeArrayunsafeFreezeArray thawArrayunsafeThawArraysameMutableArray copyArraycopyMutableArray cloneArraycloneMutableArray$fDataMutableArray $fDataArray $fReadArray $fShowArray $fMonoidArray$fMonadFixArray$fMonadZipArray$fMonadPlusArray $fMonadArray$fAlternativeArray$fApplicativeArray$fFunctorArray $fIsListArray$fTraversableArray$fFoldableArray $fOrdArray$fEqMutableArray $fEqArrayMutVar newMutVar readMutVar writeMutVaratomicModifyMutVaratomicModifyMutVar' modifyMutVar modifyMutVar' $fEqMutVarSmallMutableArray SmallArray newSmallArrayreadSmallArraywriteSmallArrayindexSmallArrayMindexSmallArraycloneSmallArraycloneSmallMutableArrayfreezeSmallArrayunsafeFreezeSmallArraythawSmallArrayunsafeThawSmallArraycopySmallArraycopySmallMutableArraysizeofSmallArraysizeofSmallMutableArray$fDataSmallMutableArray$fDataSmallArray$fReadSmallArray$fShowSmallArray$fIsListSmallArray$fMonoidSmallArray$fMonadFixSmallArray$fMonadZipSmallArray$fMonadPlusSmallArray$fMonadSmallArray$fAlternativeSmallArray$fApplicativeSmallArray$fFunctorSmallArray$fTraversableSmallArray$fFoldableSmallArray$fOrdSmallArray$fEqSmallMutableArray$fEqSmallArrayPrimsizeOf# alignment#indexByteArray#readByteArray#writeByteArray# setByteArray# indexOffAddr# readOffAddr# writeOffAddr# setOffAddr#Addr $fPrimFunPtr $fPrimPtr $fPrimAddr $fPrimChar $fPrimDouble $fPrimFloat $fPrimInt64 $fPrimInt32 $fPrimInt16 $fPrimInt8 $fPrimInt $fPrimWord64 $fPrimWord32 $fPrimWord16 $fPrimWord8 $fPrimWord $fDataAddr $fOrdAddr$fEqAddrnullAddrplusAddr minusAddrremAddr indexOffAddr readOffAddr writeOffAddrcopyAddrmoveAddrsetAddrMutableByteArray ByteArray newByteArraynewPinnedByteArraynewAlignedPinnedByteArraybyteArrayContentsmutableByteArrayContentssameMutableByteArrayunsafeFreezeByteArrayunsafeThawByteArraysizeofByteArraysizeofMutableByteArrayindexByteArray readByteArraywriteByteArray copyByteArraycopyMutableByteArray moveByteArray setByteArray fillByteArray$fDataMutableByteArray$fDataByteArraysizeOf alignment PrimUnlifted toArrayArray#fromArrayArray#MutableUnliftedArray UnliftedArrayunsafeNewUnliftedArraysetUnliftedArraynewUnliftedArraysizeofUnliftedArraysizeofMutableUnliftedArrayindexUnliftedArrayindexUnliftedArrayMreadUnliftedArraywriteUnliftedArrayunsafeFreezeUnliftedArraysameMutableUnliftedArraycopyUnliftedArraycopyMutableUnliftedArrayfreezeUnliftedArraythawUnliftedArraycloneUnliftedArraycloneMutableUnliftedArray$fEqUnliftedArray$fEqMutableUnliftedArray$fPrimUnliftedMutVar$fPrimUnliftedSmallMutableArray$fPrimUnliftedSmallArray$fPrimUnliftedMutableByteArray$fPrimUnliftedByteArray$fPrimUnliftedMutableArray$fPrimUnliftedArray"$fPrimUnliftedMutableUnliftedArray$fPrimUnliftedUnliftedArraysetWideCharOffAddr#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# Data.Data mkNoRepType GHC.TypesisTrue#IOGHC.STST emptyArray createArraydiezipW arrayDataTypefromListConstrData.Functor.IdentityIdentityemptySmallArraycreateSmallArray?noOpsmallArrayDataTypeunI#Int memmove_mba ArrayArray#GHC.BaseMonadindexUnliftedArrayU