summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/ST.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-03-01 11:15:22 +0000
committerAlberto Ruiz <aruiz@um.es>2010-03-01 11:15:22 +0000
commit283f3033f86fabde2290bb28a59e7d87fd0754f5 (patch)
treeac9000c976a805636b557b916af9e139922df70c /lib/Data/Packed/ST.hs
parent54bcc1fc1e0f9676cb10f627f412eeeea34b5d2c (diff)
compatible with vector
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