summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/ST.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Data/Packed/ST.hs')
-rw-r--r--lib/Data/Packed/ST.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Data/Packed/ST.hs b/lib/Data/Packed/ST.hs
index a47da05..48e35b4 100644
--- a/lib/Data/Packed/ST.hs
+++ b/lib/Data/Packed/ST.hs
@@ -37,11 +37,11 @@ import Foreign
37 37
38{-# INLINE ioReadV #-} 38{-# INLINE ioReadV #-}
39ioReadV :: Storable t => Vector t -> Int -> IO t 39ioReadV :: Storable t => Vector t -> Int -> IO t
40ioReadV v k = withForeignPtr (fptr v) $ \s -> peekElemOff s k 40ioReadV v k = unsafeWith v $ \s -> peekElemOff s k
41 41
42{-# INLINE ioWriteV #-} 42{-# INLINE ioWriteV #-}
43ioWriteV :: Storable t => Vector t -> Int -> t -> IO () 43ioWriteV :: Storable t => Vector t -> Int -> t -> IO ()
44ioWriteV v k x = withForeignPtr (fptr v) $ \s -> pokeElemOff s k x 44ioWriteV v k x = unsafeWith v $ \s -> pokeElemOff s k x
45 45
46newtype STVector s t = STVector (Vector t) 46newtype STVector s t = STVector (Vector t)
47 47