Skip to content

Commit

Permalink
Update Data/Primitive/PrimArray.hs
Browse files Browse the repository at this point in the history
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
  • Loading branch information
andrewthad and konsumlamm authored Sep 9, 2023
1 parent 6abce92 commit f825c2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Data/Primitive/PrimArray.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1177,9 +1177,9 @@ withPrimArrayContents (PrimArray arr#) f =
keepAliveUnlifted arr# (f (Ptr (byteArrayContents# arr#)))

-- | A composition of 'mutablePrimArrayContents' and 'keepAliveUnlifted'.
-- The callback function must not return the pointer. The argument byte
-- array must be /pinned/. See 'byteArrayContents' for an explanation
-- of which byte arrays are pinned.
-- The callback function must not return the pointer. The argument
-- array must be /pinned/. See 'primArrayContents' for an explanation
-- of which primitive arrays are pinned.
withMutablePrimArrayContents :: PrimBase m => MutablePrimArray (PrimState m) a -> (Ptr a -> m a) -> m a
{-# INLINE withMutablePrimArrayContents #-}
withMutablePrimArrayContents (MutablePrimArray arr#) f =
Expand Down

0 comments on commit f825c2d

Please sign in to comment.