diff options
Diffstat (limited to 'lib/Data/Packed/ST.hs')
-rw-r--r-- | lib/Data/Packed/ST.hs | 12 |
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 | ||
35 | import Data.Packed.Internal | 36 | import Data.Packed.Internal |
36 | import Control.Monad.ST | 37 | |
37 | import Foreign | 38 | import Control.Monad.ST(ST, runST) |
39 | import Foreign.Storable(Storable, peekElemOff, pokeElemOff) | ||
40 | |||
41 | #if MIN_VERSION_base(4,4,0) | ||
42 | import Control.Monad.ST.Unsafe(unsafeIOToST) | ||
43 | #else | ||
44 | import Control.Monad.ST(unsafeIOToST) | ||
45 | #endif | ||
38 | 46 | ||
39 | {-# INLINE ioReadV #-} | 47 | {-# INLINE ioReadV #-} |
40 | ioReadV :: Storable t => Vector t -> Int -> IO t | 48 | ioReadV :: Storable t => Vector t -> Int -> IO t |