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.hs12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Data/Packed/ST.hs b/lib/Data/Packed/ST.hs
index 2fad6ae..22aff07 100644
--- a/lib/Data/Packed/ST.hs
+++ b/lib/Data/Packed/ST.hs
@@ -1,3 +1,4 @@
1{-# LANGUAGE CPP #-}
1{-# LANGUAGE TypeOperators #-} 2{-# LANGUAGE TypeOperators #-}
2{-# LANGUAGE Rank2Types #-} 3{-# LANGUAGE Rank2Types #-}
3{-# LANGUAGE BangPatterns #-} 4{-# LANGUAGE BangPatterns #-}
@@ -33,8 +34,15 @@ module Data.Packed.ST (
33) where 34) where
34 35
35import Data.Packed.Internal 36import Data.Packed.Internal
36import Control.Monad.ST 37
37import Foreign 38import Control.Monad.ST(ST, runST)
39import Foreign.Storable(Storable, peekElemOff, pokeElemOff)
40
41#if MIN_VERSION_base(4,4,0)
42import Control.Monad.ST.Unsafe(unsafeIOToST)
43#else
44import Control.Monad.ST(unsafeIOToST)
45#endif
38 46
39{-# INLINE ioReadV #-} 47{-# INLINE ioReadV #-}
40ioReadV :: Storable t => Vector t -> Int -> IO t 48ioReadV :: Storable t => Vector t -> Int -> IO t