module RIO.Vector.Storable.Unsafe
(
Data.Vector.Storable.unsafeIndex
, Data.Vector.Storable.unsafeHead
, Data.Vector.Storable.unsafeLast
, Data.Vector.Storable.unsafeIndexM
, Data.Vector.Storable.unsafeHeadM
, Data.Vector.Storable.unsafeLastM
, Data.Vector.Storable.unsafeSlice
, Data.Vector.Storable.unsafeInit
, Data.Vector.Storable.unsafeTail
, Data.Vector.Storable.unsafeTake
, Data.Vector.Storable.unsafeDrop
, Data.Vector.Storable.unsafeUpd
, Data.Vector.Storable.unsafeUpdate_
, Data.Vector.Storable.unsafeAccum
, Data.Vector.Storable.unsafeAccumulate_
, Data.Vector.Storable.unsafeBackpermute
, Data.Vector.Storable.unsafeFreeze
, Data.Vector.Storable.unsafeThaw
, Data.Vector.Storable.unsafeCopy
, Data.Vector.Storable.unsafeFromForeignPtr
, Data.Vector.Storable.unsafeFromForeignPtr0
, Data.Vector.Storable.unsafeToForeignPtr
, Data.Vector.Storable.unsafeToForeignPtr0
, unsafeWith
) where
import Data.Vector.Storable(Storable, Vector)
import qualified Data.Vector.Storable
import Foreign.Ptr(Ptr)
import UnliftIO
unsafeWith :: (MonadUnliftIO m, Storable a) => Vector a -> (Ptr a -> m b) -> m b
unsafeWith vec action = withRunInIO $ \unlifter -> Data.Vector.Storable.unsafeWith vec (unlifter . action)