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.

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

  2. sizeofSmallArray :: SmallArray a -> Int

    primitive Data.Primitive.SmallArray

    The number of elements in an immutable array.

  3. sizeofSmallMutableArray :: SmallMutableArray s a -> Int

    primitive Data.Primitive.SmallArray

    Deprecated: use getSizeofSmallMutableArray instead

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

    primitive Data.Primitive.SmallArray

    Create a SmallArray from a list.

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

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

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

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

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

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

Page 208 of many | Previous | Next