Hoogle Search

Within LTS Haskell 24.50 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. readSmallArray :: PrimMonad m => SmallMutableArray (PrimState m) a -> Int -> m a

    primitive Data.Primitive.SmallArray

    Read the element at a given index in a mutable array. Note: this function does not do bounds checking.

  2. resizeSmallMutableArray :: PrimMonad m => SmallMutableArray (PrimState m) a -> Int -> a -> m (SmallMutableArray (PrimState m) a)

    primitive Data.Primitive.SmallArray

    Resize a mutable array to new specified size. The returned SmallMutableArray is either the original SmallMutableArray resized in-place or, if not possible, a newly allocated SmallMutableArray with the original content copied over. To avoid undefined behaviour, the original SmallMutableArray shall not be accessed anymore after a resizeSmallMutableArray has been performed. Moreover, no reference to the old one should be kept in order to allow garbage collection of the original SmallMutableArray in case a new SmallMutableArray had to be allocated.

  3. runSmallArray :: (forall s . () => ST s (SmallMutableArray s a)) -> SmallArray a

    primitive Data.Primitive.SmallArray

    Execute the monadic action and freeze the resulting array.

    runSmallArray m = runST $ m >>= unsafeFreezeSmallArray
    

  4. 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.

  5. sizeofSmallArray :: SmallArray a -> Int

    primitive Data.Primitive.SmallArray

    The number of elements in an immutable array.

  6. sizeofSmallMutableArray :: SmallMutableArray s a -> Int

    primitive Data.Primitive.SmallArray

    Deprecated: use getSizeofSmallMutableArray instead

  7. smallArrayFromList :: [a] -> SmallArray a

    primitive Data.Primitive.SmallArray

    Create a SmallArray from a list.

  8. smallArrayFromListN :: Int -> [a] -> SmallArray a

    primitive 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.

  9. 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.

  10. 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.

Page 208 of many | Previous | Next