úÎ!„h±ÿÏ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊË Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ                                  ! " # $%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  €  ‚ƒ„…†‡ˆ‰Š‹ Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á  à Ä Å Æ Ç È É Ê Ë Ì Í Î (c) Roman Leshchinskiy 2009 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone ;<=DFTV0 primitive8Class 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.  primitive*Expose the internal structure of the monad  primitiveEClass of monads which can perform primitive state-transformer actions  primitiveState token type  primitiveExecute a primitive operation  primitive,Execute a primitive operation with no result primitiveLifts a  into another  , with the same underlying state token type. primitive Convert a , to another monad with the same state token. primitive Convert a  with a  state token to Ï primitive Convert a  to Ð primitive Convert an Ï action to a  . primitive Convert an Ð action to a  . primitive Convert a Z to another monad with a possibly different state token. This operation is highly unsafe! primitive Convert any  to ÐA with an arbitrary state token. This operation is highly unsafe! primitive Convert any  to Ï". This operation is highly unsafe! primitive Convert an Ð- action with an arbitraty state token to any  #. This operation is highly unsafe! primitive Convert an Ï action to any  #. This operation is highly unsafe! primitive/Create an action to force a value; generalizes  # primitive- primitive0 primitive     (c) Roman Leshchinskiy 2011-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNoneD2ÑÒ (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone 1DFQTVpå2 primitive=Mutable boxed arrays associated with a primitive state token.5 primitive Boxed arrays: primitivecCreate a new mutable array of the specified size and initialise all elements with the given value.; primitive/Read a value from the array at the given index.< primitive.Write a value to the array at the given index.= primitive9Read a value from the immutable array at the given index.> primitive–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.? primitiveÿ 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 =! 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 ?, 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.@ primitive0Create 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.A primitivetConvert a mutable array to an immutable one without copying. The array should not be modified after the conversion.B primitive: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.C primitive{Convert an immutable array to an mutable one without copying. The immutable array should not be used after the conversion.D primitive<Check whether the two arrays refer to the same memory block.E primitive6Copy a slice of an immutable array to a mutable array.F primitiveVCopy a slice of a mutable array to another array. The two arrays may not be the same.G primitive»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.H primitiveÑReturn 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.J primitiveThis is the fastest, most straightforward way to traverse an array, but it only works correctly with a sufficiently "affine"  D instance. In particular, it must only produce *one* result array. >-transformed monads, for example, will not work right at all.K primitive*Strict map over the elements of the array.M primitiveO primitiveR primitive\ primitive] primitiveALexicographic ordering. Subject to change between major versions.^ primitive@ primitivesource primitiveoffset primitivelengthB primitivesource primitiveoffset primitivelengthE primitivedestination array primitiveoffset into destination array primitive source array primitiveoffset into source array primitivenumber of elements to copyF primitivedestination array primitiveoffset into destination array primitive source array primitiveoffset into source array primitivenumber of elements to copyG primitive source array primitiveoffset into destination array primitivenumber of elements to copyH primitive source array primitiveoffset into destination array primitivenumber of elements to copy23456789:;<=>?@ABCDEFGHIJK567234:;<=?>@BIACDEFGH89KJBSD2 non-portableNoneD• e primitive Create a new c that is initially empty.f primitive Create a new c" that holds the supplied argument.g primitiveReturn the contents of the c . If the c is currently empty, g& will wait until it is full. After a g, the c is left empty.h primitive#Atomically read the contents of an c . If the c is currently empty, h will wait until it is full. h# is guaranteed to receive the next i.Multiple Wakeup: hA is multiple-wakeup, so when multiple readers are blocked on an c,, all of them are woken up at the same time.Compatibility note: On GHCs prior to 7.8, h is a combination of g and i<. Consequently, its behavior differs in the following ways:/It is single-wakeup instead of multiple-wakeup.5It might not receive the value from the next call to i4 if there is already a pending thread blocked on g.&If another thread puts a value in the c in between the calls to g and i, that value may be overridden.i primitivePut a value into an c . If the c is currently full, i" will wait until it becomes empty.j primitiveA non-blocking version of g. The j% function returns immediately, with Ó if the c was empty, or Ô a if the c was full with contents a . After j, the c is left empty.k primitiveA non-blocking version of i. The k% function attempts to put the value a into the c , returning Õ if it was successful, or Ö otherwise.l primitiveA non-blocking version of h. The l% function returns immediately, with Ó if the c was empty, or Ô a if the c was full with contents a.Compatibility note: On GHCs prior to 7.8, l is a combination of j and i<. Consequently, its behavior differs in the following ways:/It is single-wakeup instead of multiple-wakeup.)In the presence of other threads calling i, l may block.&If another thread puts a value in the c in between the calls to j and i, that value may be overridden.m primitiveCheck whether a given c is empty.êNotice that the boolean value returned is just a snapshot of the state of the MVar. By the time you get to react on its result, the MVar may have been filled (or emptied) - so be extremely careful when using this operation. Use j instead if possible. cdefghijklm cdfmeihgklj (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNoneD— "opqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ"qrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽpo (c) Roman Leshchinskiy 2011-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone D™êרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñò4(c) Justin Bonnar 2011, Roman Leshchinskiy 2011-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone1D£›‘ primitiveA ‘V behaves like a single-element mutable array associated with a primitive state token.“ primitive Create a new ‘! with the specified initial value” primitiveRead the value of a ‘• primitiveWrite a new value into a ‘– primitive$Atomically mutate the contents of a ‘— primitiveStrict version of –,. This forces both the value stored in the ‘ as well as the value returned.˜ primitiveMutate the contents of a ‘™ primitiveStrict version of ˜ ‘’“”•–—˜™ ‘’“”•–—˜™(c) 2015 Dan DoelBSD3libraries@haskell.org non-portableNone1345DFKQTVØ]Ÿ primitive!Create a new small mutable array.  primitive5Read the element at a given index in a mutable array.¡ primitive6Write an element at the given idex in a mutable array.¢ primitive)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 ók is not adequate for this use, as it is a newtype, and cannot be evaluated without evaluating the element.£ primitive)Look up an element in an immutable array.¤ primitive–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.¥ primitive/Create a copy of a slice of an immutable array.¦ primitive,Create a copy of a slice of a mutable array.§ primitiveFCreate an immutable array corresponding to a slice of a mutable array.<This operation copies the portion of the array to be frozen.¨ primitive!Render a mutable array immutable.hThis operation performs no copying, so care must be taken not to modify the input array after freezing.© primitiveFCreate a mutable array corresponding to a slice of an immutable array.<This operation copies the portion of the array to be thawed.ª primitive"Render an immutable array mutable.GThis operation performs no copying, so care must be taken with its use.« primitive8Copy a slice of an immutable array into a mutable array.¬ primitive/Copy a slice of one mutable array into another.¯ primitiveThis is the fastest, most straightforward way to traverse an array, but it only works correctly with a sufficiently "affine"  D instance. In particular, it must only produce *one* result array. >-transformed monads, for example, will not work right at all.° primitive*Strict map over the elements of the array.² primitive Create a w from a list of a known length. If the length of the list does not match the given length, this throws an exception.³ primitive Create a  from a list.µ primitive· primitive» primitiveÄ primitiveALexicographic ordering. Subject to change between major versions.Å primitiveÇ primitive Ÿ primitivesize primitiveinitial contents  primitivearray primitiveindex¡ primitivearray primitiveindex primitive new element¢ primitivearray primitiveindex£ primitivearray primitiveindex¥ primitivesource primitiveoffset primitivelength¦ primitivesource primitiveoffset primitivelength§ primitivesource primitiveoffset primitivelength© primitivesource primitiveoffset primitivelength« primitive destination primitivedestination offset primitivesource primitive source offset primitivelength¬ primitive destination primitivedestination offset primitivesource primitive source offset primitivelength›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³ž›œŸ ¡«¬£¢¤¥¦§¨©±ª­®³²°¯ô1  (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone ,-01DFKV¼Ë primitiveNewtype that uses a Î instance to give rise to a õ6 instance. This type is intended to be used with the  DerivingViaN extension available in GHC 8.6 and up. For example, consider a user-defined Î& instance for a multi-word data type. gdata 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.Î primitive4Class of types supporting primitive array operationsÏ primitiveSize of values of type a. The argument is not used.Ð primitiveAlignment of values of type a. The argument is not used.Ñ primitive@Read a value from the array. The offset is in elements of type a rather than in bytes.Ò primitiveHRead a value from the mutable array. The offset is in elements of type a rather than in bytes.Ó primitiveGWrite a value to the mutable array. The offset is in elements of type a rather than in bytes.Ô primitivelFill 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.Õ primitive¥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.Ö primitivejRead 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.× primitiveiWrite 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.Ø primitivepFill 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.Ù primitiveA machine addressÛ primitiveSize of values of type a. The argument is not used.8This function has existed since 0.1, but was moved from  to  in version 0.6.3.0Ü primitiveAlignment of values of type a. The argument is not used.8This function has existed since 0.1, but was moved from  to  in version 0.6.3.0Ý primitiveAn 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: ÿHdata Trip = Trip Int Int Int instance Prim Trip sizeOf# _ = 3# *# sizeOf# (undefined :: Int) alignment# _ = alignment# (undefined :: 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#Þ primitiveAn implementation of Ø that calls ×, to set each element. The documentation of Ý) provides an example of how to use this.ËÌÍÎÔÏÐÑÒÓÕÖרÙÚÛÜÝÞÎÔÏÐÑÒÓÕÖרÛÜÝÞÙÚËÌÍ (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone  1DFTV^þ$ primitive;Mutable byte arrays associated with a primitive state token& primitive Byte arrays( primitive?Create a new mutable byte array of the specified size in bytes.) primitive Create a pinned` byte array of the specified size in bytes. The garbage collector is guaranteed not to move it.* primitive 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.+ primitiveEYield a pointer to the array's data. This operation is only safe on pinned byte arrays allocated by ) or *., primitiveEYield a pointer to the array's data. This operation is only safe on pinned byte arrays allocated by ) or *.- primitive7Check if the two arrays refer to the same memory block.. primitive<Resize a mutable byte array. The new size is given in bytes.™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./ primitive.Get the size of a byte array in bytes. Unlike 3@, this function ensures sequencing in the presence of resizing.0 primitiveyConvert a mutable byte array to an immutable one without copying. The array should not be modified after the conversion.1 primitive~Convert an immutable byte array to a mutable one without copying. The original array should not be used after the conversion.2 primitive Size of the byte array in bytes.3 primitiveTSize of the mutable byte array in bytes. This function's behavior is undefined if .} is ever called on the mutable byte array given as the argument. Consequently, use of this function is discouraged. Prefer /@, which ensures correct sequencing in the presence of resizing.4 primitiveCheck whether or not the byte array is pinned. Pinned byte arrays cannot be moved by the garbage collector. It is safe to use +a on such byte arrays. This function is only available when compiling with GHC 8.2 or newer.5 primitiveCheck whether or not the mutable byte array is pinned. This function is only available when compiling with GHC 8.2 or newer.6 primitiveURead a primitive value from the byte array. The offset is given in elements of type a rather than in bytes.7 primitiveURead a primitive value from the byte array. The offset is given in elements of type a rather than in bytes.8 primitiveTWrite a primitive value to the byte array. The offset is given in elements of type a rather than in bytes.9 primitive"Right-fold over the elements of a &.< primitive@Copy a slice of an immutable byte array to a mutable byte array.= primitiveYCopy a slice of a mutable byte array into another array. The two slices may not overlap.> primitive™Copy a slice of a byte array to an unmanaged address. These must not overlap. This function is only available when compiling with GHC 7.8 or newer.? primitive¡Copy a slice of a mutable byte array to an unmanaged address. These must not overlap. This function is only available when compiling with GHC 7.8 or newer.@ primitiveRCopy a slice of a mutable byte array into another, potentially overlapping array.A primitivehFill 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.B primitive1Fill a slice of a mutable byte array with a byte.C primitiveF primitive¶Non-lexicographic ordering. This compares the lengths of the byte arrays first and uses a lexicographic ordering if the lengths are equal. Subject to change between major versions.G primitiveH primitive* primitivesize primitive alignment< primitivedestination array primitiveoffset into destination array primitive source array primitiveoffset into source array primitivenumber of bytes to copy= primitivedestination array primitiveoffset into destination array primitive source array primitiveoffset into source array primitivenumber of bytes to copy> primitive destination primitive source array primitiveoffset into source array primitivenumber of bytes to copy? primitive destination primitive source array primitiveoffset into source array primitivenumber of bytes to copy@ primitivedestination array primitiveoffset into destination array primitive source array primitiveoffset into source array primitivenumber of bytes to copyA primitive array to fill primitiveoffset into array primitivenumber of values to fill primitivevalue to fill withB primitive array to fill primitiveoffset into array primitivenumber of bytes to fill primitivebyte to fill with!$%&'()*+,-./0123456789:;<=>?@AB!&'$%()*.786:;901<=>?@AB23/-45+,  (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNone DFQTVçò3K primitive Mutable 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 Ðn. Typically, a mutable primitive array will be built and then convert 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.M primitive4Arrays of unboxed elements. This accepts types like ö, ÷, ø, and ù*, as well as their fixed-length variants (Word8, Word16+, etc.). Since the elements are unboxed, a M? is strict in its elements. This differs from the behavior of Array!, which is lazy in its elements.Q primitive&Convert the primitive array to a list.ú primitiveThe empty primitive array.R primitivegCreate a new mutable primitive array of the given length. The underlying memory is left uninitialized.S primitiveDResize 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 K( shall not be accessed anymore after a S has been performed. Moreover, no reference to the old one should be kept in order to allow garbage collection of the original K in case a new K had to be allocated.T primitive×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. This function is only available when compiling with GHC 7.10 or newer.V primitive$Write an element to the given index.W primitive˜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.X primitive1Copy part of an array into another mutable array.Y primitivesCopy a slice of an immutable primitive array to an address. The offset and length are given in elements of type a$. This function assumes that the Î instance of a agrees with the StorableR instance. This function is only available when building with GHC 7.8 or newer.Z primitivesCopy a slice of an immutable primitive array to an address. The offset and length are given in elements of type a$. This function assumes that the Î instance of a agrees with the StorableR instance. This function is only available when building with GHC 7.8 or newer.[ primitive7Fill a slice of a mutable primitive array with a value.\ primitive>Get the size of a mutable primitive array in elements. Unlike ]@, this function ensures sequencing in the presence of resizing.] primitive’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 S or T.^ primitive7Check if the two arrays refer to the same memory block._ primitiveyConvert a mutable byte array to an immutable one without copying. The array should not be modified after the conversion.` primitiveyConvert an immutable array to a mutable one without copying. The original array should not be used after the conversion.a primitive0Read a primitive value from the primitive array.b primitive2Get the size, in elements, of the primitive array.c primitive2Lazy right-associated fold over the elements of a M.d primitive4Strict right-associated fold over the elements of a M.e primitive1Lazy left-associated fold over the elements of a M.f primitive3Strict left-associated fold over the elements of a M.g primitive3Strict left-associated fold over the elements of a M.h primitive¤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, h can replace s˜, 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 h7. To do this, we must change the traversal context to  MaybeT (ST s), which has a   instance: ÈincrPositiveB :: PrimArray Int -> Maybe (PrimArray Int) incrPositiveB xs = runST $ runMaybeT $ traversePrimArrayP (\x -> bool (MaybeT (return Nothing)) (MaybeT (return (Just (x + 1)))) (x > 0)) xs‚Benchmarks demonstrate that the second implementation runs 150 times faster than the first. It also results in fewer allocations.i primitiveaFilter the primitive array, keeping the elements for which the monadic predicate evaluates true.j primitive_Map over the primitive array, keeping the elements for which the monadic predicate provides a Ô.k primitiveWGenerate a primitive array by evaluating the monadic generator function at each index.l primitiveaExecute the monadic action the given number of times and store the results in a primitive array.m primitive+Map over the elements of a primitive array.n primitive3Indexed map over the elements of a primitive array.o primitive>Filter elements of a primitive array according to a predicate.p primitiveaFilter the primitive array, keeping the elements for which the monadic predicate evaluates true.q primitivecMap over the primitive array, keeping the elements for which the applicative predicate provides a Ô.r primitivebMap over a primitive array, optionally discarding some elements. This has the same behavior as Data.Maybe.mapMaybe.s primitiveSTraverse a primitive array. The traversal performs all of the applicative effects beforeY forcing the resulting values and writing them to the new primitive array. Consequently:ZtraversePrimArray (\x -> print x $> bool x undefined (x == 2)) (fromList [1, 2, 3 :: Int])123 *** Exception: Prelude.undefined The function h6 always outperforms this function, but it requires a PrimAffineMonadB constraint, and it forces the values as it performs the effects.t primitive:Traverse a primitive array with the index of each element.u primitive§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.v primitiveGenerate a primitive array.w primitiveKCreate a primitive array by copying the element the given number of times.x primitive[Generate a primitive array by evaluating the applicative generator function at each index.y primitive\Execute the applicative action the given number of times and store the results in a vector.z primitiveCTraverse the primitive array, discarding the results. There is no  N variant of this function since it would not provide any performance benefit.{ primitiveTTraverse the primitive array with the indices, discarding the results. There is no  N variant of this function since it would not provide any performance benefit.| primitive} primitive~ primitive primitive€ primitiveALexicographic ordering. Subject to change between major versions. primitiveS primitivenew sizeT primitivenew sizeV primitivearray primitiveindex primitiveelementW primitivedestination array primitiveoffset into destination array primitive source array primitiveoffset into source array primitivenumber of elements to copyX primitivedestination array primitiveoffset into destination array primitive source array primitiveoffset into source array primitivenumber of elements to copyY primitivedestination pointer primitive source array primitiveoffset into source array primitivenumber of prims to copyZ primitivedestination pointer primitive source array primitiveoffset into source array primitivenumber of prims to copy[ primitive array to fill primitiveoffset into array primitivenumber of values to fill primitivevalue to fill with\ primitivearrayk primitivelength primitive generatorp primitivemapping function primitiveprimitive arrayq primitivemapping function primitiveprimitive arrays primitivemapping function primitiveprimitive arrayv primitivelength primitiveelement from indexw primitivelength primitiveelementx primitivelength primitiveelement from indexy primitivelength primitiveapplicative element producer1KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{1MNKLRSTUVa_`XWYZ[^\]bQOPcdefgz{mnvworstxypqhuklij (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNoneDVQ ‚ primitive1Offset a pointer by the given number of elements.ƒ primitiveaSubtract a pointer from another pointer. The result represents the number of elements of type aJ that fit in the contiguous memory range bounded by these two pointers.„ primitive¤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.… primitivejRead 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.† primitiveiWrite 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.‡ primitive2Copy the given number of elements from the second * to the first. The areas may not overlap.ˆ primitive2Copy the given number of elements from the second & to the first. The areas may overlap.‰ primitiveMFill a memory block with the given value. The length is in elements of type a rather than in bytes.Š primitivegCopy from a pointer to a mutable primitive array. The offset and length are given in elements of type aH. This function is only available when building with GHC 7.8 or newer.‡ primitivedestination pointer primitivesource pointer primitivenumber of elementsˆ primitivedestination address primitivesource address primitivenumber of elementsŠ primitivedestination array primitivedestination offset primitivesource pointer primitivenumber of elements ‚ƒ„…†‡ˆ‰Š ‚ƒ„…†‡ˆ‰Š  (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNoneDâ ‹ primitiveThe null addressŒ primitive.Offset an address by the given number of bytes primitive`Distance in bytes between two addresses. The result is only valid if the difference fits in an ø.Ž primitive-The remainder of the address and the integer. primitive¥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. primitivejRead 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.‘ primitiveiWrite 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.’ primitive/Copy the given number of bytes from the second Ù* to the first. The areas may not overlap.“ primitive(Copy the given number of bytes from the Ù to the $h. The areas may not overlap. This function is only available when compiling with GHC 7.8 or newer.” primitive/Copy the given number of bytes from the second Ù& to the first. The areas may overlap.• primitivePFill a memory block of with the given value. The length is in elements of type a rather than in bytes.– primitive Convert an Ù to an ø.’ primitivedestination address primitivesource address primitivenumber of bytes“ primitive destination primitive!offset into the destination array primitivesource primitivenumber of bytes to copy” primitivedestination address primitivesource address primitivenumber of bytesÙÚ‹ŒŽ‘’“”•–ÙÚ‹ŒŽ‘’“”•–Œ66Ž7 (c) Dan Doel 2016 BSD-style!Libraries <libraries@haskell.org> non-portableNone 1DFQTVb¯'— primitive3Classifies 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 û.š primitiveÀ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.œ primitiveÂ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.ž primitiveCreates a new šÖ. This function is unsafe because it initializes all elements of the array as pointers to the array itself. Attempting to read one of these elements before writing to it is in effect an unsafe coercion from the MutableUnliftedArray s a to the element type.Ÿ primitiveDSets all the positions in an unlifted array to the designated value.  primitiveCreates a new šD with the specified value as initial contents. This is slower than ž , but safer.¡ primitiveYields the length of an œ.¢ primitiveYields the length of a š.£ primitive/Gets the value at the specified position of an œ.¤ primitive/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 5, 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.¥ primitive.Gets the value at the specified position of a š.¦ primitive.Sets the value at the specified position of a š.§ primitive 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.¨ primitiveDetermines whether two šR values are the same. This is object/pointer identity, not based on the contents.© primitive?Copies the contents of an immutable array into a mutable array.ª primitive6Copies the contents of one mutable array into another.« primitiveFreezes 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.¬ primitiveThaws a portion of an œ , yielding a šT. This copies the thawed portion, so mutations will not affect the original array.­ primitive>Execute a stateful computation and freeze the resulting array.® primitive"Creates a copy of a portion of an œ¯ primitiveCreates a new š: containing a copy of a portion of another mutable array.° primitive3Lazy right-associated fold over the elements of an œ.± primitiveDStrict right-associated fold over the elements of an 'UnliftedArray.² primitive2Lazy left-associated fold over the elements of an œ.³ primitive4Strict left-associated fold over the elements of an œ.´ primitiveMap over the elements of an œ.µ primitive%Convert the unlifted array to a list.¹ primitiveº primitive» primitive¼ primitive½ primitiveALexicographic ordering. Subject to change between major versions.¿ primitiveÀ primitiveÁ primitive primitiveà primitiveÇ primitiveÈ primitive ž primitivesizeŸ primitive destination primitivevalue to fill with  primitivesize primitive initial value£ primitivesource primitiveindex¤ primitivesource primitiveindex¥ primitivesource primitiveindex¦ primitive destination primitiveindex primitivevalue© primitive destination primitiveoffset into destination primitivesource primitiveoffset into source primitivenumber of elements to copyª primitive destination primitiveoffset into destination primitivesource primitiveoffset into source primitivenumber of elements to copy« primitivesource primitiveoffset primitivelength¬ primitivesource primitiveoffset primitivelength® primitivesource primitiveoffset primitivelength¯ primitivesource primitiveoffset primitivelength!—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·!œš›—˜™ž Ÿ¡¢¥¦£¤§«¬­¨©ª®¯µ¶·°±²³´ (c) Roman Leshchinskiy 2009-2012 BSD-style'Roman Leshchinskiy <rl@cse.unsw.edu.au> non-portableNoneDeiÑ23456789:;<=>?@ABCDEFGHIJK‘’“”•–—˜™›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³ËÌÍÎÔÏÐÑÒÓÕÖרÙÚÛÜÝÞ$%&'()*+,-./0123456789:;<=>?@ABKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·ý ! " !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMMNOOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{||}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©©ª«¬­®¯°±²²³³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß à à á â ã ä å æ ç è é ê ë ì í í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 677889:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ \ \ ] ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ  Ž  ‘’“”•–—˜™ š › œ  ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ © © ª ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á  à Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú ÛÜÝÞßàáÜâãäãåÜæÜçèéêëìíîïðñòóôõö÷øùúûüýþÿÜ Ü Ü Ü  ãprimitive-0.6.4.0-inplaceData.Primitive.ArrayData.Primitive.ByteArrayControl.Monad.PrimitiveData.Primitive.PtrData.Primitive.MVarData.Primitive.MachDepsData.Primitive.MutVarData.Primitive.SmallArrayData.Primitive.TypesData.Primitive.PrimArrayData.Primitive.AddrData.Primitive.UnliftedArrayControl.ExceptionevaluateData.Primitive.Internal.CompatControl.Monad.Trans.ListListT"Data.Primitive.Internal.OperationsData PrimitiveData.PrimitiveTypesbaseGHC.ExtsfromList fromListNghc-primGHC.Prim ByteArray#MutableByteArray# RealWorldGHC.PtrPtrnullPtrPrimBaseinternal PrimMonad PrimState primitive primitive_liftPrim primToPrimprimToIOprimToSTioToPrimstToPrimunsafePrimToPrimunsafePrimToSTunsafePrimToIOunsafeSTToPrimunsafeIOToPrimunsafeInlinePrimunsafeInlineIOunsafeInlineSTtouchevalPrim $fPrimMonadST$fPrimMonadRWST$fPrimMonadWriterT$fPrimMonadStateT$fPrimMonadSelectT$fPrimMonadAccumT$fPrimMonadExceptT$fPrimMonadRWST0$fPrimMonadWriterT0$fPrimMonadStateT0$fPrimMonadReaderT$fPrimMonadErrorT$fPrimMonadMaybeT$fPrimMonadListT$fPrimMonadIdentityT$fPrimMonadContT $fPrimMonadIO $fPrimBaseST$fPrimBaseIdentityT $fPrimBaseIO MutableArraymarray#Arrayarray# sizeofArraysizeofMutableArraynewArray readArray writeArray indexArray indexArray## indexArrayM freezeArrayunsafeFreezeArray thawArrayunsafeThawArraysameMutableArray copyArraycopyMutableArray cloneArraycloneMutableArrayrunArraytraverseArrayP mapArray' $fDataArray $fRead1Array $fReadArray $fShow1Array $fShowArray $fMonoidArray$fSemigroupArray$fMonadFixArray$fMonadZipArray$fMonadPlusArray$fAlternativeArray$fApplicativeArray$fFunctorArray $fIsListArray$fTraversableArray$fFoldableArray $fOrd1Array $fOrdArray $fEq1Array $fEqArray$fDataMutableArray$fEqMutableArray $fMonadArrayMVar newEmptyMVarnewMVartakeMVarreadMVarputMVar tryTakeMVar tryPutMVar tryReadMVar isEmptyMVar$fEqMVarInt64_#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_WORD64MutVar newMutVar readMutVar writeMutVaratomicModifyMutVaratomicModifyMutVar' modifyMutVar modifyMutVar' $fEqMutVarSmallMutableArray SmallArray newSmallArrayreadSmallArraywriteSmallArrayindexSmallArrayMindexSmallArrayindexSmallArray##cloneSmallArraycloneSmallMutableArrayfreezeSmallArrayunsafeFreezeSmallArraythawSmallArrayunsafeThawSmallArraycopySmallArraycopySmallMutableArraysizeofSmallArraysizeofSmallMutableArraytraverseSmallArrayPmapSmallArray' runSmallArraysmallArrayFromListNsmallArrayFromList$fDataSmallArray$fRead1SmallArray$fReadSmallArray$fShow1SmallArray$fShowSmallArray$fIsListSmallArray$fMonoidSmallArray$fSemigroupSmallArray$fMonadFixSmallArray$fMonadZipSmallArray$fMonadPlusSmallArray$fAlternativeSmallArray$fApplicativeSmallArray$fFunctorSmallArray$fTraversableSmallArray$fFoldableSmallArray$fOrdSmallArray$fOrd1SmallArray$fEqSmallArray$fEq1SmallArray$fDataSmallMutableArray$fEqSmallMutableArray$fMonadSmallArray PrimStorablegetPrimStorablePrimsizeOf# alignment#indexByteArray#readByteArray#writeByteArray# setByteArray# indexOffAddr# readOffAddr# writeOffAddr# setOffAddr#AddrsizeOf alignmentdefaultSetByteArray#defaultSetOffAddr# $fDataAddr $fOrdAddr$fEqAddr $fShowAddr $fPrimFunPtr $fPrimPtr $fPrimAddr $fPrimChar $fPrimDouble $fPrimFloat $fPrimInt64 $fPrimInt32 $fPrimInt16 $fPrimInt8 $fPrimInt $fPrimWord64 $fPrimWord32 $fPrimWord16 $fPrimWord8 $fPrimWord$fStorablePrimStorable$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 $fPrimCCharMutableByteArray ByteArray newByteArraynewPinnedByteArraynewAlignedPinnedByteArraybyteArrayContentsmutableByteArrayContentssameMutableByteArrayresizeMutableByteArraygetSizeofMutableByteArrayunsafeFreezeByteArrayunsafeThawByteArraysizeofByteArraysizeofMutableByteArrayisByteArrayPinnedisMutableByteArrayPinnedindexByteArray readByteArraywriteByteArrayfoldrByteArraybyteArrayFromListbyteArrayFromListN copyByteArraycopyMutableByteArraycopyByteArrayToAddrcopyMutableByteArrayToAddr moveByteArray setByteArray fillByteArray$fIsListByteArray$fMonoidByteArray$fSemigroupByteArray$fOrdByteArray $fEqByteArray$fShowByteArray$fDataByteArray$fDataMutableByteArrayMutablePrimArray PrimArrayprimArrayFromListprimArrayFromListNprimArrayToList newPrimArrayresizeMutablePrimArrayshrinkMutablePrimArray readPrimArraywritePrimArraycopyMutablePrimArray copyPrimArraycopyPrimArrayToPtrcopyMutablePrimArrayToPtr setPrimArraygetSizeofMutablePrimArraysizeofMutablePrimArraysameMutablePrimArrayunsafeFreezePrimArrayunsafeThawPrimArrayindexPrimArraysizeofPrimArrayfoldrPrimArrayfoldrPrimArray'foldlPrimArrayfoldlPrimArray'foldlPrimArrayM'traversePrimArrayPfilterPrimArrayPmapMaybePrimArrayPgeneratePrimArrayPreplicatePrimArrayP mapPrimArray imapPrimArrayfilterPrimArrayfilterPrimArrayAmapMaybePrimArrayAmapMaybePrimArraytraversePrimArrayitraversePrimArrayitraversePrimArrayPgeneratePrimArrayreplicatePrimArraygeneratePrimArrayAreplicatePrimArrayAtraversePrimArray_itraversePrimArray_$fMonoidPrimArray$fSemigroupPrimArray$fShowPrimArray$fIsListPrimArray$fOrdPrimArray $fEqPrimArray advancePtr subtractPtr indexOffPtr readOffPtr writeOffPtrcopyPtrmovePtrsetPtrcopyPtrToMutablePrimArraynullAddrplusAddr minusAddrremAddr indexOffAddr readOffAddr writeOffAddrcopyAddrcopyAddrToByteArraymoveAddrsetAddr addrToInt PrimUnlifted toArrayArray#fromArrayArray#MutableUnliftedArray UnliftedArrayunsafeNewUnliftedArraysetUnliftedArraynewUnliftedArraysizeofUnliftedArraysizeofMutableUnliftedArrayindexUnliftedArrayindexUnliftedArrayMreadUnliftedArraywriteUnliftedArrayunsafeFreezeUnliftedArraysameMutableUnliftedArraycopyUnliftedArraycopyMutableUnliftedArrayfreezeUnliftedArraythawUnliftedArrayrunUnliftedArraycloneUnliftedArraycloneMutableUnliftedArrayfoldrUnliftedArrayfoldrUnliftedArray'foldlUnliftedArrayfoldlUnliftedArray'mapUnliftedArrayunliftedArrayToListunliftedArrayFromListunliftedArrayFromListN$fEqMutableUnliftedArray$fIsListUnliftedArray$fMonoidUnliftedArray$fSemigroupUnliftedArray$fShowUnliftedArray$fOrdUnliftedArray$fEqUnliftedArray$fPrimUnliftedThreadId$fPrimUnliftedWeak$fPrimUnliftedStablePtr$fPrimUnliftedTVar$fPrimUnliftedMVar$fPrimUnliftedMutVar$fPrimUnliftedSmallMutableArray$fPrimUnliftedSmallArray$fPrimUnliftedMutablePrimArray$fPrimUnliftedPrimArray$fPrimUnliftedMutableByteArray$fPrimUnliftedByteArray$fPrimUnliftedMutableArray$fPrimUnliftedArray"$fPrimUnliftedMutableUnliftedArray$fPrimUnliftedUnliftedArray GHC.TypesIOGHC.STST Data.Data mkNoRepTypeisTrue#GHC.BaseNothingJustTrueFalsesetWideCharOffAddr#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.Functor.IdentityIdentity?Foreign.StorableStorableDoubleCharIntWordemptyPrimArray ArrayArray#Monad