Hoogle Search
Within LTS Haskell 24.67 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
shrinkSmallMutableArray :: PrimMonad m => SmallMutableArray (PrimState m) a -> Int -> m ()primitive Data.Primitive.SmallArray 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.
sizeofSmallArray :: SmallArray a -> Intprimitive Data.Primitive.SmallArray The number of elements in an immutable array.
sizeofSmallMutableArray :: SmallMutableArray s a -> Intprimitive Data.Primitive.SmallArray Deprecated: use getSizeofSmallMutableArray instead
smallArrayFromList :: [a] -> SmallArray aprimitive Data.Primitive.SmallArray Create a SmallArray from a list.
smallArrayFromListN :: Int -> [a] -> SmallArray aprimitive Data.Primitive.SmallArray Create a SmallArray from a list of a known length. If the length of the list does not match the given length, this throws an exception.
thawSmallArray :: PrimMonad m => SmallArray a -> Int -> Int -> m (SmallMutableArray (PrimState m) a)primitive Data.Primitive.SmallArray Create a mutable array corresponding to a slice of an immutable array. This operation copies the portion of the array to be thawed. Note: The provided array should contain the full subrange specified by the two Ints, but this is not checked.
traverseSmallArrayP :: PrimMonad m => (a -> m b) -> SmallArray a -> m (SmallArray b)primitive Data.Primitive.SmallArray This is the fastest, most straightforward way to traverse an array, but it only works correctly with a sufficiently "affine" PrimMonad instance. In particular, it must only produce one result array. ListT-transformed monads, for example, will not work right at all.
unsafeFreezeSmallArray :: PrimMonad m => SmallMutableArray (PrimState m) a -> m (SmallArray a)primitive Data.Primitive.SmallArray Render a mutable array immutable. This operation performs no copying, so care must be taken not to modify the input array after freezing.
unsafeThawSmallArray :: PrimMonad m => SmallArray a -> m (SmallMutableArray (PrimState m) a)primitive Data.Primitive.SmallArray Render an immutable array mutable. This operation performs no copying, so care must be taken with its use.
writeSmallArray :: PrimMonad m => SmallMutableArray (PrimState m) a -> Int -> a -> m ()primitive Data.Primitive.SmallArray Write an element at the given idex in a mutable array. Note: this function does not do bounds checking.