h,Sݼ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                                                        0.9.1.0  Safe-Inferred ` (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy  non-portableNone " !%)#'+  $("&* "  !"#$%&'()*+  (c) Roman Leshchinskiy 2011-2012 BSD-style'Roman Leshchinskiy  non-portableNone 1 "(c) Roman Leshchinskiy 2009 BSD-style'Roman Leshchinskiy  non-portableNone1 ,.'s state token type can be annoying to handle in constraints. This typeclass lets users (visually) notice 12 equality constraints less, by witnessing that s ~ 1 m.-0's state token type can be annoying to handle in constraints. This typeclass lets users (visually) notice 12 equality constraints less, by witnessing that s ~ 1 m.. primitive8Class of primitive monads for state-transformer actions.Unlike 0#, this typeclass requires that the Monad 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.0Class of monads which can perform primitive state-transformer actions.1State token type.2Execute a primitive operation.3-Execute a primitive operation with no result.4Lifts a . into another 0, with the same underlying state token type.5 Convert a ., to another monad with the same state token.6 Convert a . with a  state token to 7 Convert a . to 8 primitive Convert an  action to a 0.9 primitive Convert an  action to a 0.: Convert a . 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!= primitive Convert an - action with an arbitrary state token to any 0#. This operation is highly unsafe!> primitive Convert an  action to any 0#. This operation is highly unsafe!?See @9. This function is not recommended for the same reasons.@8Generally, do not use this function. It is the same as accursedUnutterablePerformIO from  bytestring and is well behaved under narrow conditions. See the documentation of that function to get an idea of when this is sound. In most cases $GHC.IO.Unsafe.unsafeDupablePerformIO should be preferred.ASee @. This function is not recommended for the same reasons. Prefer runST when s is free.BEnsure that the value is considered alive by the garbage collection. Warning: GHC has optimization passes that can erase touch if it is certain that an exception is thrown afterward. Prefer D.C Variant of B/ that keeps a value of an unlifted type (e.g. MutableByteArray#) alive.D Keep value x alive until computation k completes. Warning: This primop exists for completeness, but it is difficult to use correctly. Prefer E if the value to keep alive is simply a wrapper around an unlifted type (e.g.  ByteArray).E Variant of D= in which the value kept alive is of an unlifted boxed type.F primitive/Create an action to force a value; generalizes P primitiveZ primitive^ primitiveDValue x! to keep alive while computation k runs. Computation kF8DE4G65739BCI>@?AH<:;=-,./0120123./-,456789:<;>=?@ABCDEFHIGBSD2 non-portableNone%@ bA synchronizing variable, used for communication between concurrent threads. It can be thought of as a box, which may be empty or full.d Create a new b that is initially empty.e Create a new b" that holds the supplied argument.fReturn the contents of the b . If the b is currently empty, f% will wait until it is full. After a f, the b is left empty..There are two further important properties of f:f is single-wakeup. That is, if there are multiple threads blocked in f , and the b becomes full, only one thread will be woken up. The runtime guarantees that the woken thread completes its f operation.(When multiple threads are blocked on an b, they are woken up in FIFO order. This is useful for providing fairness properties of abstractions built using bs.g#Atomically read the contents of an b . If the b is currently empty, g will wait until it is full. g# is guaranteed to receive the next h.Multiple Wakeup: g is multiple-wakeup, so when multiple readers are blocked on an b,, all of them are woken up at the same time./It is single-wakeup instead of multiple-wakeup.5It might not receive the value from the next call to h4 if there is already a pending thread blocked on f.&If another thread puts a value in the b in between the calls to f and h, that value may be overridden.hPut a value into an b . If the b is currently full, h" will wait until it becomes empty..There are two further important properties of h:h is single-wakeup. That is, if there are multiple threads blocked in h , and the b becomes empty, only one thread will be woken up. The runtime guarantees that the woken thread completes its h operation.(When multiple threads are blocked on an b, they are woken up in FIFO order. This is useful for providing fairness properties of abstractions built using bs.iA non-blocking version of f. The i% function returns immediately, with  if the b was empty, or  a if the b was full with contents a. After i, the b is left empty.jA non-blocking version of h. The j% function attempts to put the value a into the b , returning  if it was successful, or  otherwise.kA non-blocking version of g. The k% function returns immediately, with  if the b was empty, or  a if the b was full with contents a./It is single-wakeup instead of multiple-wakeup.)In the presence of other threads calling h, k may block.&If another thread puts a value in the b in between the calls to i and h, that value may be overridden.lCheck whether a given b is empty.Notice that the boolean value returned is just a snapshot of the state of the b3. By the time you get to react on its result, the b may have been filled (or emptied) - so be extremely careful when using this operation. Use i instead if possible. ldehgfjkibc bceldhgfjki (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy  non-portableNone8;!n=Mutable boxed arrays associated with a primitive state token.q Boxed arrays.Strictly create an array from a nonempty list (represented as a first element and a list of the rest) of a known length. If the length of the list does not match the given length, this makes demons fly out of your nose. We use it in the  instance. If you edit the splice and break it, you get to keep both pieces.t-The number of elements in an immutable array.u*The number of elements in a mutable array.vCreate a new mutable array of the specified size and initialise all elements with the given value.Note:; this function does not check if the input is non-negative.w/Read a value from the array at the given index.Note:+ this function does not do bounds checking.x.Write a value to the array at the given index.Note:+ this function does not do bounds checking.y9Read a value from the immutable array at the given index.Note:+ this function does not do bounds checking.zRead a value from the immutable array at the given index, returning the result in an unboxed unary tuple. This is currently used to implement folds.Note:+ this function does not do bounds checking.{Read a value from the immutable array at the given index using an applicative. 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: copy marr arr ... = do ... writeArray marr i (indexArray arr i) ... ...,But since the arrays are lazy, the calls to y! will not be evaluated. Rather, marr will be filled with thunks each of which would retain a reference to arr&. This is definitely not what we want!With {, 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.Note:+ this function does not do bounds checking.|0Create an immutable copy of a slice of an array.This operation makes a copy of the specified section, so it is safe to continue using the mutable array afterward.Note: The provided array should contain the full subrange specified by the two Ints, but this is not checked.}Convert 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.This operation makes a copy of the specified slice, so it is safe to use the immutable array afterward.Note: The provided array should contain the full subrange specified by the two Ints, but this is not checked.Convert an immutable array to an mutable one without copying. The immutable array should not be used after the conversion.>= unsafeFreezeArrayCreate an array of the given size with a default value, apply the monadic function and freeze the result. If the size is 0, return " (rather than a new copy thereof). createArray 0 _ _ = emptyArray createArray n x f = runArray $ do mary <- newArray n x f mary pure maryThis is the fastest, most straightforward way to traverse an array, but it only works correctly with a sufficiently "affine" 00 instance. In particular, it must only produce one result array. >-transformed monads, for example, will not work right at all.*Strict map over the elements of the array.Create an array from a list of a known length. If the length of the list does not match the given length, this throws an exception.Create an array from a list. primitive primitive primitive primitiveLexicographic ordering. Subject to change between major versions. primitive|sourceoffsetlength~sourceoffsetlengthdestination arrayoffset into destination array source arrayoffset into source arraynumber of elements to copydestination arrayoffset into destination array source arrayoffset into source arraynumber of elements to copy source arrayoffset into destination arraynumber of elements to copy source arrayoffset into destination arraynumber of elements to copy|yz{vwtu~}xqrsnopqrsnopvwxy{z|~}tu4(c) Justin Bonnar 2011, Roman Leshchinskiy 2011-2012 BSD-style'Roman Leshchinskiy  non-portableNone8A A  behaves like a single-element mutable array associated with a primitive state token. Create a new " with the specified initial value.Read the value of a .Write a new value into a .$Atomically mutate the contents of a ."This function is useful for using  in a safe way in a multithreaded program. If you only have one  , then using 7 to access and modify it will prevent race conditions.$Extending the atomicity to multiple s is problematic, so if you need to do anything more complicated, using  instead is a good idea. does not apply the function strictly. This means if a program calls  many times, but seldom uses the value, thunks will pile up in memory resulting in a space leak. To avoid this problem, use  instead.Strict version of ,. This forces both the value stored in the  as well as the value returned.Mutate the contents of a . does not apply the function strictly. This means if a program calls  many times, but seldom uses the value, thunks will pile up in memory resulting in a space leak. To avoid this problem, use  instead.Strict version of .Convert  to Convert  to Convert  to Convert  to    (c) 2015 Dan DoelBSD3libraries@haskell.org non-portableNone8:;<[!Strictly create an array from a nonempty list (represented as a first element and a list of the rest) of a known length. If the length of the list does not match the given length, this makes demons fly out of your nose. We use it in the  instance. If you edit the splice and break it, you get to keep both pieces.!Create a new small mutable array.Note:; this function does not check if the input is non-negative.5Read the element at a given index in a mutable array.Note:+ this function does not do bounds checking.6Write an element at the given idex in a mutable array.Note:+ this function does not do bounds checking.)Look up an element in an immutable array.The purpose of returning a result using an applicative 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: data 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 0It also does not prevent sa from being garbage collected. Note that  is not adequate for this use, as it is a newtype, and cannot be evaluated without evaluating the element.Note:+ this function does not do bounds checking.)Look up an element in an immutable array.Note:+ this function does not do bounds checking.Read a value from the immutable array at the given index, returning the result in an unboxed unary tuple. This is currently used to implement folds.Note:+ this function does not do bounds checking./Create a copy of a slice of an immutable array.Note: The provided array should contain the full subrange specified by the two Ints, but this is not checked.,Create a copy of a slice of a mutable array.Note: The provided array should contain the full subrange specified by the two Ints, but this is not checked.Create an immutable array corresponding to a slice of a mutable array.-transformed monads, for example, will not work right at all.*Strict map over the elements of the array.:Execute the monadic action and freeze the resulting array. 6runSmallArray m = runST $ m >>= unsafeFreezeSmallArrayCreate an array of the given size with a default value, apply the monadic function and freeze the result. If the size is 0, return " (rather than a new copy thereof). createSmallArray 0 _ _ = emptySmallArray createSmallArray n x f = runSmallArray $ do mary <- newSmallArray n x f mary pure mary The empty . Create a  from a list of a known length. If the length of the list does not match the given length, this throws an exception. Create a  from a list.Shrink the mutable array in place. The size given must be equal to or less than the current size of the array. This is not checked. non-portableNone 7p"Newtype that uses a  instance to give rise to a 6 instance. This type is intended to be used with the  DerivingVia extension available in GHC 8.6 and up. For example, consider a user-defined & instance for a multi-word data type. data Uuid = Uuid Word64 Word64 deriving Storable via (PrimStorable Uuid) instance Prim Uuid where ... Writing the . instance is tedious and unavoidable, but the # instance comes for free once the  instance is written.Class of types supporting primitive array operations. This includes interfacing with GC-managed memory (functions suffixed with  ByteArray#) and interfacing with unmanaged memory (functions suffixed with Addr#%). Endianness is platform-dependent. primitive The size of values of type a6 in bytes. This has to be used with TypeApplications:  sizeOfType @a.The size of values of type a$ in bytes. The argument is not used.It is recommended to use  instead. primitive  The alignment of values of type a6 in bytes. This has to be used with TypeApplications: alignmentOfType @a. The alignment of values of type a$ in bytes. The argument is not used.It is recommended to use  instead.Read a value from the array. The offset is in elements of type a rather than in bytes.Read a value from the mutable array. The offset is in elements of type a rather than in bytes.Write a value to the mutable array. The offset is in elements of type a rather than in bytes.Fill 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.Read 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.Write 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.Fill 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 dummy value of type a. primitive The size of values of type a6 in bytes. This has to be used with TypeApplications:  sizeOfType @a.:set -XTypeApplicationsimport Data.Int (Int32)sizeOfType @Int324The size of values of type a$ in bytes. The argument is not used.It is recommended to use  instead.8This function has existed since 0.1, but was moved from  to  in version 0.6.3.0. primitive  The alignment of values of type a6 in bytes. This has to be used with TypeApplications: alignmentOfType @a. The alignment of values of type a$ in bytes. The argument is not used.It is recommended to use  instead.8This function has existed since 0.1, but was moved from  to  in version 0.6.3.0.An implementation of  that calls 6 to set each element. This is helpful when writing a  instance for a multi-word data type for which there is no CPU-accelerated way to broadcast a value to contiguous memory. It is typically used alongside . For example: data Trip = Trip Int Int Int instance Prim Trip sizeOfType# _ = 3# *# sizeOfType# (proxy# :: Proxy# Int) alignmentOfType# _ = alignmentOfType# (proxy# :: Proxy# Int) indexByteArray# arr# i# = ... readByteArray# arr# i# = ... writeByteArray# arr# i# (Trip a b c) = \s0 -> case writeByteArray# arr# (3# *# i#) a s0 of s1 -> case writeByteArray# arr# ((3# *# i#) +# 1#) b s1 of s2 -> case writeByteArray# arr# ((3# *# i#) +# 2# ) c s2 of s3 -> s3 setByteArray# = defaultSetByteArray# indexOffAddr# addr# i# = ... readOffAddr# addr# i# = ... writeOffAddr# addr# i# (Trip a b c) = \s0 -> case writeOffAddr# addr# (3# *# i#) a s0 of s1 -> case writeOffAddr# addr# ((3# *# i#) +# 1#) b s1 of s2 -> case writeOffAddr# addr# ((3# *# i#) +# 2# ) c s2 of s3 -> s3 setOffAddr# = defaultSetOffAddr#An implementation of  that calls , to set each element. The documentation of ) provides an example of how to use this. primitive primitive primitive  primitive primitive primitive primitive primitive primitive primitive primitive primitive primitiveoffsetlengthoffsetlength (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy  non-portableNone P-Create a new mutable byte array of the specified size in bytes. The underlying memory is left uninitialized.Note:; this function does not check if the input is non-negative. Create a pinned byte array of the specified size in bytes. The garbage collector is guaranteed not to move it. The underlying memory is left uninitialized.Note:; this function does not check if the input is non-negative. Create a pinned byte array of the specified size in bytes and with the given alignment. The garbage collector is guaranteed not to move it. The underlying memory is left uninitialized.Note:; this function does not check if the input is non-negative.Create a foreign pointer that points to the array's data. This operation is only safe on pinned byte arrays. The array's data is not garbage collected while references to the foreign pointer exist. Writing to the array through the foreign pointer results in undefined behavior. Variant of ; for mutable byte arrays. Similarly, this is only safe on pinned mutable byte arrays. This function differs from the variant for immutable arrays in that it is safe to write to the array though the foreign pointer.Yield a pointer to the array's data. This operation is only safe on pinned' byte arrays. Byte arrays allocated by  and 8 are guaranteed to be pinned. Byte arrays allocated by  may or may not be pinned (use  to figure out).Prefer , which ensures that the array is not garbage collected while the pointer is being used.A composition of  and E. The callback function must not return the pointer. The argument byte array must be pinned. See 5 for an explanation of which byte arrays are pinned.%Note: This could be implemented with D instead of E, but D here would cause GHC to materialize the wrapper data constructor on the heap.Yield a pointer to the array's data. This operation is only safe on pinned byte arrays. See 5 for an explanation of which byte arrays are pinned.Prefer , which ensures that the array is not garbage collected while the pointer is being used.A composition of  and E. The callback function must not return the pointer. The argument byte array must be pinned. See 5 for an explanation of which byte arrays are pinned.7Check if the two arrays refer to the same memory block. primitive>= unsafeFreezeByteArrayRead an 8-bit element from the byte array, interpreting it as a Latin-1-encoded character. The offset is given in bytes.Note:+ this function does not do bounds checking.Write a character to the byte array, encoding it with Latin-1 as a single byte. Behavior is undefined for codepoints outside of the ASCII and Latin-1 blocks. The offset is given in bytes.Note:+ this function does not do bounds checking.Read an 8-bit element from the byte array, interpreting it as a Latin-1-encoded character. The offset is given in bytes.Note:+ this function does not do bounds checking.size alignmentsourceoffset in byteslength in bytessourceoffset in byteslength in bytesnew sizedestination 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 destination source array:offset into source array, interpreted as elements of type anumber of elements to copydestination array-destination offset given in elements of type asource pointernumber of elements destination source array:offset into source array, interpreted as elements of type anumber of elements to copy destination source arrayoffset into source arraynumber of bytes to copy destination 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 witharray Aoffset A, given in bytesarray Boffset B, given in bytes#length of the slice, given in bytes source arrayoffset into destination arraynumber of bytes to copy source arrayoffset into destination arraynumber of bytes to copy4 4   (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy  non-portableNoneMutable primitive arrays associated with a primitive state token. These can be written to and read from in a monadic context that supports sequencing, such as  or . Typically, a mutable primitive array will be built and then converted to an immutable primitive array using . However, it is also acceptable to simply discard a mutable primitive array since it lives in managed memory and will be garbage collected when no longer referenced.4Arrays of unboxed elements. This accepts types like , ,  and *, as well as their fixed-length variants (,  +, etc.). Since the elements are unboxed, a  is strict in its elements. This differs from the behavior of ! , which is lazy in its elements. Create a  from a list. primArrayFromList vs =  (length vs) vs Create a  from a list of a known length. If the length of the list does not match the given length, this throws an exception. Convert a  to a list. The empty .Create a new mutable primitive array of the given length. The underlying memory is left uninitialized.Note:; this function does not check if the input is non-negative.Resize a mutable primitive array. The new size is given in elements.This will either resize the array in-place or, if not possible, allocate the contents into a new, unpinned array and copy the original array's contents.+To avoid undefined behaviour, the original ( shall not be accessed anymore after a  has been performed. Moreover, no reference to the old one should be kept in order to allow garbage collection of the original  in case a new  had to be allocated.Shrink a mutable primitive array. The new size is given in elements. It must be smaller than the old size. The array will be resized in place./Read a value from the array at the given index.Note:+ this function does not do bounds checking.$Write an element to the given index.Note:+ this function does not do bounds checking.Copy part of a mutable array into another mutable array. In the case that the destination and source arrays are the same, the regions may overlap.Note:6 this function does not do bounds or overlap checking.1Copy part of an array into another mutable array.Note:6 this function does not do bounds or overlap checking.Copy a slice of an immutable primitive array to a pointer. The offset and length are given in elements of type a". This function assumes that the  instance of a agrees with the "# instance.Note:6 this function does not do bounds or overlap checking.Copy a slice of a mutable primitive array to a pointer. The offset and length are given in elements of type a". This function assumes that the  instance of a agrees with the "# instance.Note:6 this function does not do bounds or overlap checking.Copy from a pointer to a mutable primitive array. The offset and length are given in elements of type a". This function assumes that the  instance of a agrees with the "# instance.Note:6 this function does not do bounds or overlap checking.7Fill a slice of a mutable primitive array with a value.Note:+ this function does not do bounds checking.>Get the size of a mutable primitive array in elements. Unlike , this function ensures sequencing in the presence of resizing.Size of the mutable primitive array in elements. This function shall not be used on primitive arrays that are an argument to or a result of  or .0This function is deprecated and will be removed.7Check if the two arrays refer to the same memory block.Create an immutable copy of a slice of a primitive array. The offset and length are given in elements.This operation makes a copy of the specified section, so it is safe to continue using the mutable array afterward.Note: The provided array should contain the full subrange specified by the two Ints, but this is not checked. primitiveCreate a mutable primitive array from a slice of an immutable primitive array. The offset and length are given in elements.This operation makes a copy of the specified slice, so it is safe to use the immutable array afterward.Note: The provided array should contain the full subrange specified by the two Ints, but this is not checked.Convert a mutable primitive array to an immutable one without copying. The array should not be modified after the conversion.Convert an immutable array to a mutable one without copying. The original array should not be used after the conversion.0Read a primitive value from the primitive array.Note:+ this function does not do bounds checking.2Get the size, in elements, of the primitive array. primitiveCheck whether or not the primitive array is pinned. Pinned primitive arrays cannot be moved by the garbage collector. It is safe to use  on such arrays. This function is only available when compiling with GHC 8.2 or newer. primitiveCheck whether or not the mutable primitive array is pinned. This function is only available when compiling with GHC 8.2 or newer.2Lazy right-associated fold over the elements of a .4Strict right-associated fold over the elements of a .1Lazy left-associated fold over the elements of a .3Strict left-associated fold over the elements of a .3Strict left-associated fold over the elements of a .Traverse a primitive array. The traversal forces the resulting values and writes them to the new primitive array as it performs the monadic effects. Consequently:traversePrimArrayP (\x -> print x $> bool x undefined (x == 2)) (fromList [1, 2, 3 :: Int])12 *** Exception: Prelude.undefinedIn many situations,  can replace , changing the strictness characteristics of the traversal but typically improving the performance. Consider the following short-circuiting traversal: incrPositiveA :: PrimArray Int -> Maybe (PrimArray Int) incrPositiveA xs = traversePrimArray (\x -> bool Nothing (Just (x + 1)) (x > 0)) xsThis can be rewritten using 7. To do this, we must change the traversal context to  MaybeT (ST s), which has a 0 instance: incrPositiveB :: PrimArray Int -> Maybe (PrimArray Int) incrPositiveB xs = runST $ runMaybeT $ traversePrimArrayP (\x -> bool (MaybeT (return Nothing)) (MaybeT (return (Just (x + 1)))) (x > 0)) xsBenchmarks demonstrate that the second implementation runs 150 times faster than the first. It also results in fewer allocations.Filter the primitive array, keeping the elements for which the monadic predicate evaluates to true.Map over the primitive array, keeping the elements for which the monadic predicate provides a .Generate a primitive array by evaluating the monadic generator function at each index.Execute the monadic action the given number of times and store the results in a primitive array.+Map over the elements of a primitive array.3Indexed map over the elements of a primitive array.>Filter elements of a primitive array according to a predicate.Filter the primitive array, keeping the elements for which the monadic predicate evaluates true.Map over the primitive array, keeping the elements for which the applicative predicate provides a .Map over a primitive array, optionally discarding some elements. This has the same behavior as Data.Maybe.mapMaybe.Traverse a primitive array. The traversal performs all of the applicative effects before forcing the resulting values and writing them to the new primitive array. Consequently:traversePrimArray (\x -> print x $> bool x undefined (x == 2)) (fromList [1, 2, 3 :: Int])123 *** Exception: Prelude.undefined The function 6 always outperforms this function, but it requires a 0 constraint, and it forces the values as it performs the effects.:Traverse a primitive array with the index of each element.Traverse a primitive array with the indices. The traversal forces the resulting values and writes them to the new primitive array as it performs the monadic effects.Generate a primitive array.Create a primitive array by copying the element the given number of times.Generate a primitive array by evaluating the applicative generator function at each index.Execute the applicative action the given number of times and store the results in a .Traverse the primitive array, discarding the results. There is no 0 variant of this function, since it would not provide any performance benefit.Traverse the primitive array with the indices, discarding the results. There is no 0 variant of this function, since it would not provide any performance benefit. primitive Create a pinned primitive array of the specified size (in elements). The garbage collector is guaranteed not to move it. The underlying memory is left uninitialized. primitive Create a pinned primitive array of the specified size (in elements) and with the alignment given by its  instance. The garbage collector is guaranteed not to move it. The underlying memory is left uninitialized. primitiveYield a pointer to the array's data. This operation is only safe on pinned prim arrays allocated by $ or %. primitiveYield a pointer to the array's data. This operation is only safe on pinned byte arrays allocated by $ or %.Return 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.Return a newly allocated mutable array with the specified subrange of the provided mutable array. The provided mutable array should contain the full subrange specified by the two Ints, but this is not checked.:Execute the monadic action and freeze the resulting array. 4runPrimArray m = runST $ m >>= unsafeFreezePrimArrayCreate an uninitialized array of the given length, apply the function to it, and freeze the result.Note:; this function does not check if the input is non-negative. @since FIXMEA composition of  and E. The callback function must not return the pointer. The argument array must be pinned. See : for an explanation of which primitive arrays are pinned.%Note: This could be implemented with D instead of E, but D here would cause GHC to materialize the wrapper data constructor on the heap.A composition of  and E. The callback function must not return the pointer. The argument array must be pinned. See : for an explanation of which primitive arrays are pinned. primitive primitive primitive primitive primitiveLexicographic ordering. Subject to change between major versions. primitivenew sizenew sizearrayindexelementdestination arrayoffset into destination array source arrayoffset into source arraynumber of elements to copydestination arrayoffset into destination array source arrayoffset into source arraynumber of elements to copydestination pointer source arrayoffset into source arraynumber of elements to copydestination pointer source arrayoffset into source arraynumber of elements to copydestination arraydestination offsetsource pointernumber of elements array to filloffset into arraynumber of values to fillvalue to fill witharraysourceoffset in elementslength in elementssourceoffset in elementslength in elementslength generatormapping functionprimitive arraymapping functionprimitive arraymapping functionprimitive arraylengthelement from indexlengthelementlengthelement from indexlengthapplicative element producer source arrayoffset into destination arraynumber of elements to copy source arrayoffset into destination arraynumber of elements to copy (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy  non-portableNone1Offset a pointer by the given number of elements.Subtract a pointer from another pointer. The result represents the number of elements of type a that fit in the contiguous memory range bounded by these two pointers.Read a value from a memory position given by a pointer 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.Read 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.Write 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.2Copy the given number of elements from the second * to the first. The areas may not overlap.2Copy the given number of elements from the second & to the first. The areas may overlap.Fill a memory block with the given value. The length is in elements of type a rather than in bytes.destination pointersource pointernumber of elementsdestination pointersource pointernumber of elements   (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy  non-portableNoneԳ|yz{vwtu~}x qrsnop UnsafekA 7 behaves like a single-element mutable primitive array.Create a primitive reference.$Create a pinned primitive reference.Create a pinned primitive reference with the appropriate alignment for its contents.Read a value from the .Write a value to the .Mutate the contents of a .!Yield a pointer to the data of a . This operation is only safe on pinned byte arrays allocated by  or . Convert a  to a one-elment .Given a primitive reference, 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.Given a reference, and a value to add, atomically add the value to the element. Returns the value of the element before the operation.Given a reference, and a value to subtract, atomically subtract the value from the element. Returns the value of the element before the operation.Given a reference, and a value to bitwise and, atomically and the value with the element. Returns the value of the element before the operation.Given a reference, and a value to bitwise nand, atomically nand the value with the element. Returns the value of the element before the operation.Given a reference, and a value to bitwise or, atomically or the value with the element. Returns the value of the element before the operation.Given a reference, and a value to bitwise xor, atomically xor the value with the element. Returns the value of the element before the operation..Given a reference, atomically read an element./Given a reference, atomically write an element.&'(&')&'*+,-+,-+,./01/01/02/023456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ [\]^_`abcdefghijklmnopqrstuvwxyz{|}~!!!                                                         $%                                                                                                   &&+++&&++ ++#+&&&&(primitive-0.9.1.0-G6oOmpPg4754sa1FpVFVP9Data.Primitive.ByteArrayControl.Monad.PrimitiveData.Primitive.TypesData.Primitive.PtrData.Primitive.MachDepsData.Primitive.MVarData.Primitive.ArrayData.Primitive.MutVarData.Primitive.SmallArrayData.Primitive.PrimArrayData.Primitive.PrimVar primitiveData.Primitive.Internal.Read"Data.Primitive.Internal.OperationsControl.ExceptionevaluateControl.Monad.Trans.ListListTMVarData PrimitiveData.PrimitiveTypes $dmalignment#$dmalignmentOfType#$dmsetByteArray#$dmsetOffAddr# $dmsizeOf#$dmsizeOfType# Data.WordWord8Word16ArrayForeign.StorableStorablenewPinnedByteArraynewAlignedPinnedByteArrayghc-primGHC.Prim ByteArray#MutableByteArray# RealWorld ghc-internalGHC.Internal.PtrPtrnullPtrbaseData.Array.ByteMutableByteArray ByteArrayInt64_#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 MonadPrimBase MonadPrimPrimBaseinternal PrimMonad PrimState primitive_liftPrim primToPrimprimToIOprimToSTioToPrimstToPrimunsafePrimToPrimunsafePrimToSTunsafePrimToIOunsafeSTToPrimunsafeIOToPrimunsafeInlinePrimunsafeInlineIOunsafeInlineSTtouch touchUnlifted keepAlivekeepAliveUnliftedevalPrim noDuplicateunsafeInterleaveunsafeDupableInterleave $fPrimMonadST$fPrimMonadST0$fPrimMonadRWST$fPrimMonadWriterT$fPrimMonadStateT$fPrimMonadSelectT$fPrimMonadAccumT$fPrimMonadExceptT$fPrimMonadRWST0$fPrimMonadRWST1$fPrimMonadWriterT0$fPrimMonadWriterT1$fPrimMonadStateT0$fPrimMonadReaderT$fPrimMonadMaybeT$fPrimMonadIdentityT$fPrimMonadContT $fPrimMonadIO $fPrimBaseST $fPrimBaseST0$fPrimBaseIdentityT $fPrimBaseIO $fMonadPrimsm$fMonadPrimBasesm newEmptyMVarnewMVartakeMVarreadMVarputMVar tryTakeMVar tryPutMVar tryReadMVar isEmptyMVar$fEqMVar MutableArraymarray#array# sizeofArraysizeofMutableArraynewArray readArray writeArray indexArray indexArray## indexArrayM freezeArrayunsafeFreezeArray thawArrayunsafeThawArraysameMutableArray copyArraycopyMutableArray cloneArraycloneMutableArray emptyArrayrunArray createArraytraverseArrayP mapArray'arrayFromListN arrayFromList $fDataArray $fRead1Array $fReadArray $fShow1Array $fShowArray $fMonoidArray$fSemigroupArray$fMonadFixArray$fMonadZipArray$fMonadPlusArray$fMonadFailArray$fAlternativeArray$fApplicativeArray$fFunctorArray $fIsListArray$fTraversableArray$fFoldableArray $fOrd1Array $fOrdArray $fEq1Array $fEqArray $fNFDataArray$fNFData1Array$fLiftBoxedRepArray$fDataMutableArray$fEqMutableArray $fMonadArrayMutVar newMutVar readMutVar writeMutVaratomicModifyMutVaratomicModifyMutVar' modifyMutVar modifyMutVar' mutVarToIORefmutVarFromIORef mutVarToSTRefmutVarFromSTRef $fEqMutVarSmallMutableArray SmallArray newSmallArrayreadSmallArraywriteSmallArrayindexSmallArrayMindexSmallArrayindexSmallArray##cloneSmallArraycloneSmallMutableArrayfreezeSmallArrayunsafeFreezeSmallArraythawSmallArrayunsafeThawSmallArraycopySmallArraycopySmallMutableArraysizeofSmallArraygetSizeofSmallMutableArraysizeofSmallMutableArraytraverseSmallArrayPmapSmallArray' runSmallArraycreateSmallArrayemptySmallArraysmallArrayFromListNsmallArrayFromListshrinkSmallMutableArrayresizeSmallMutableArray$fDataSmallArray$fRead1SmallArray$fReadSmallArray$fShow1SmallArray$fShowSmallArray$fIsListSmallArray$fMonoidSmallArray$fSemigroupSmallArray$fMonadFixSmallArray$fMonadZipSmallArray$fMonadPlusSmallArray$fMonadFailSmallArray$fAlternativeSmallArray$fApplicativeSmallArray$fFunctorSmallArray$fTraversableSmallArray$fFoldableSmallArray$fOrdSmallArray$fOrd1SmallArray$fEqSmallArray$fEq1SmallArray$fLiftBoxedRepSmallArray$fNFDataSmallArray$fNFData1SmallArray$fDataSmallMutableArray$fEqSmallMutableArray$fMonadSmallArray PrimStorablegetPrimStorablePrim sizeOfType#sizeOf#alignmentOfType# alignment#indexByteArray#readByteArray#writeByteArray# setByteArray# indexOffAddr# readOffAddr# writeOffAddr# setOffAddr# sizeOfTypesizeOfalignmentOfType alignmentdefaultSetByteArray#defaultSetOffAddr# $fPrimIntPtr $fPrimWordPtr $fPrimFunPtr$fPrimStablePtr $fPrimPtr $fPrimChar $fPrimDouble $fPrimFloat $fPrimInt64 $fPrimInt32 $fPrimInt16 $fPrimInt8 $fPrimInt $fPrimWord64 $fPrimWord32 $fPrimWord16 $fPrimWord8 $fPrimWord $fPrimComplex$fStorablePrimStorable $fPrimMax $fPrimMin $fPrimLast $fPrimFirst $fPrimProduct $fPrimSum $fPrimDual$fPrimIdentity $fPrimDown $fPrimConst$fPrimFd $fPrimCTimer $fPrimCKey $fPrimCId$fPrimCFsFilCnt$fPrimCFsBlkCnt$fPrimCClockId $fPrimCBlkCnt$fPrimCBlkSize $fPrimCRLim $fPrimCTcflag $fPrimCSpeed $fPrimCCc $fPrimCUid $fPrimCNlink $fPrimCGid $fPrimCSsize $fPrimCPid $fPrimCOff $fPrimCMode $fPrimCIno $fPrimCDev $fPrimCDouble $fPrimCFloat$fPrimCSUSeconds$fPrimCUSeconds $fPrimCTime $fPrimCClock$fPrimCUIntMax $fPrimCIntMax$fPrimCUIntPtr $fPrimCIntPtr $fPrimCBool $fPrimCULLong $fPrimCLLong$fPrimCSigAtomic $fPrimCWchar $fPrimCSize$fPrimCPtrdiff $fPrimCULong $fPrimCLong $fPrimCUInt $fPrimCInt $fPrimCUShort $fPrimCShort $fPrimCUChar $fPrimCSChar $fPrimCChar newByteArraybyteArrayAsForeignPtrmutableByteArrayAsForeignPtrbyteArrayContentswithByteArrayContentsmutableByteArrayContentswithMutableByteArrayContentssameMutableByteArrayresizeMutableByteArraygetSizeofMutableByteArrayfreezeByteArray thawByteArrayunsafeFreezeByteArrayunsafeThawByteArraysizeofByteArraysizeofMutableByteArrayshrinkMutableByteArrayisByteArrayPinnedisMutableByteArrayPinnedindexByteArray readByteArraywriteByteArrayfoldrByteArraybyteArrayFromListbyteArrayFromListN copyByteArraycopyMutableByteArraycopyByteArrayToPtrcopyPtrToMutableByteArraycopyMutableByteArrayToPtrcopyByteArrayToAddrcopyMutableByteArrayToAddr moveByteArray setByteArray fillByteArraycompareByteArraysemptyByteArraycloneByteArraycloneMutableByteArray runByteArraycreateByteArray readCharArraywriteCharArrayindexCharArrayMutablePrimArray PrimArrayprimArrayFromListprimArrayFromListNprimArrayToListemptyPrimArray newPrimArrayresizeMutablePrimArrayshrinkMutablePrimArray readPrimArraywritePrimArraycopyMutablePrimArray copyPrimArraycopyPrimArrayToPtrcopyMutablePrimArrayToPtrcopyPtrToMutablePrimArray setPrimArraygetSizeofMutablePrimArraysizeofMutablePrimArraysameMutablePrimArrayfreezePrimArray thawPrimArrayunsafeFreezePrimArrayunsafeThawPrimArrayindexPrimArraysizeofPrimArrayisPrimArrayPinnedisMutablePrimArrayPinnedfoldrPrimArrayfoldrPrimArray'foldlPrimArrayfoldlPrimArray'foldlPrimArrayM'traversePrimArrayPfilterPrimArrayPmapMaybePrimArrayPgeneratePrimArrayPreplicatePrimArrayP mapPrimArray imapPrimArrayfilterPrimArrayfilterPrimArrayAmapMaybePrimArrayAmapMaybePrimArraytraversePrimArrayitraversePrimArrayitraversePrimArrayPgeneratePrimArrayreplicatePrimArraygeneratePrimArrayAreplicatePrimArrayAtraversePrimArray_itraversePrimArray_newPinnedPrimArraynewAlignedPinnedPrimArrayprimArrayContentsmutablePrimArrayContentsclonePrimArraycloneMutablePrimArray runPrimArraycreatePrimArraywithPrimArrayContentswithMutablePrimArrayContents$fMonoidPrimArray$fSemigroupPrimArray$fShowPrimArray$fIsListPrimArray$fOrdPrimArray $fEqPrimArray$fNFDataPrimArray$fLiftBoxedRepPrimArray$fNFDataMutablePrimArray$fEqMutablePrimArray advancePtr subtractPtr indexOffPtr readOffPtr writeOffPtrcopyPtrmovePtrsetPtrPrimVar newPrimVarnewPinnedPrimVarnewAlignedPinnedPrimVar readPrimVar writePrimVar modifyPrimVarprimVarContentsprimVarToMutablePrimArraycasInt fetchAddInt fetchSubInt fetchAndInt fetchNandInt fetchOrInt fetchXorInt atomicReadIntatomicWriteInt $fEqPrimVarlexTagTag FromListNTag FromListTagkeepAliveLiftedLifted#keepAliveUnliftedLifted#mutableByteArrayContentsShim setAddrArray#setAddrOffAddr#setDoubleArray#setDoubleOffAddr#setFloatArray#setFloatOffAddr#setInt16Array#setInt16OffAddr#setInt32Array#setInt32OffAddr#setInt64Array#setInt64OffAddr# setInt8Array#setInt8OffAddr# setIntArray#setIntOffAddr#setStablePtrArray#setStablePtrOffAddr#setWideCharArray#setWideCharOffAddr#setWord16Array#setWord16OffAddr#setWord32Array#setWord32OffAddr#setWord64Array#setWord64OffAddr#setWord8Array#setWord8OffAddr# setWordArray#setWordOffAddr# GHC.Types UnliftedTypeIOGHC.Internal.STSTGHC.Internal.MaybeNothingJustTrueFalseunsafeArrayFromListN'template-haskellLanguage.Haskell.TH.SyntaxLiftGHC.Internal.IORefIORefGHC.Internal.STRefSTRefunsafeSmallArrayFromListN'"GHC.Internal.Data.Functor.IdentityIdentityGHC.Internal.Foreign.StorabledummyGHC.Internal.WordDoubleCharIntWord