@@ -353,12 +353,16 @@ data MutArray a =
353353-- Pinning & Unpinning
354354-------------------------------------------------------------------------------
355355
356+-- | Copy the 'MutArray' to pinned memory if unpinned, else do nothing. The
357+-- overhead is a copy if the input array is unpinned.
356358{-# INLINE pin #-}
357359pin :: MutArray a -> IO (MutArray a)
358360pin arr@MutArray{..} = do
359361 contents <- Unboxed.pin arrContents
360362 return $ arr {arrContents = contents}
361363
364+-- | Copy the 'MutArray' to unpinned memory if pinned, else do nothing. The
365+-- overhead is a copy if the input array is pinned.
362366{-# INLINE unpin #-}
363367unpin :: MutArray a -> IO (MutArray a)
364368unpin arr@MutArray{..} = do