diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/base/src/Internal/ST.hs (renamed from packages/base/src/Data/Packed/ST.hs) | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/packages/base/src/Data/Packed/ST.hs b/packages/base/src/Internal/ST.hs index 5c45c7b..25e7969 100644 --- a/packages/base/src/Data/Packed/ST.hs +++ b/packages/base/src/Internal/ST.hs | |||
@@ -1,10 +1,8 @@ | |||
1 | {-# LANGUAGE CPP #-} | ||
2 | {-# LANGUAGE TypeOperators #-} | ||
3 | {-# LANGUAGE Rank2Types #-} | 1 | {-# LANGUAGE Rank2Types #-} |
4 | {-# LANGUAGE BangPatterns #-} | 2 | {-# LANGUAGE BangPatterns #-} |
5 | ----------------------------------------------------------------------------- | 3 | ----------------------------------------------------------------------------- |
6 | -- | | 4 | -- | |
7 | -- Module : Data.Packed.ST | 5 | -- Module : Internal.ST |
8 | -- Copyright : (c) Alberto Ruiz 2008 | 6 | -- Copyright : (c) Alberto Ruiz 2008 |
9 | -- License : BSD3 | 7 | -- License : BSD3 |
10 | -- Maintainer : Alberto Ruiz | 8 | -- Maintainer : Alberto Ruiz |
@@ -14,9 +12,8 @@ | |||
14 | -- See examples/inplace.hs in the distribution. | 12 | -- See examples/inplace.hs in the distribution. |
15 | -- | 13 | -- |
16 | ----------------------------------------------------------------------------- | 14 | ----------------------------------------------------------------------------- |
17 | {-# OPTIONS_HADDOCK hide #-} | ||
18 | 15 | ||
19 | module Data.Packed.ST ( | 16 | module Internal.ST ( |
20 | -- * Mutable Vectors | 17 | -- * Mutable Vectors |
21 | STVector, newVector, thawVector, freezeVector, runSTVector, | 18 | STVector, newVector, thawVector, freezeVector, runSTVector, |
22 | readVector, writeVector, modifyVector, liftSTVector, | 19 | readVector, writeVector, modifyVector, liftSTVector, |
@@ -32,16 +29,17 @@ module Data.Packed.ST ( | |||
32 | unsafeThawMatrix, unsafeFreezeMatrix | 29 | unsafeThawMatrix, unsafeFreezeMatrix |
33 | ) where | 30 | ) where |
34 | 31 | ||
35 | import Data.Packed.Internal | 32 | import Internal.Vector |
33 | import Internal.Matrix | ||
34 | import Internal.Vectorized | ||
35 | import Data.Vector.Storable(unsafeWith) | ||
36 | |||
36 | 37 | ||
37 | import Control.Monad.ST(ST, runST) | 38 | import Control.Monad.ST(ST, runST) |
38 | import Foreign.Storable(Storable, peekElemOff, pokeElemOff) | 39 | import Foreign.Storable(Storable, peekElemOff, pokeElemOff) |
39 | 40 | ||
40 | #if MIN_VERSION_base(4,4,0) | 41 | |
41 | import Control.Monad.ST.Unsafe(unsafeIOToST) | 42 | import Control.Monad.ST.Unsafe(unsafeIOToST) |
42 | #else | ||
43 | import Control.Monad.ST(unsafeIOToST) | ||
44 | #endif | ||
45 | 43 | ||
46 | {-# INLINE ioReadV #-} | 44 | {-# INLINE ioReadV #-} |
47 | ioReadV :: Storable t => Vector t -> Int -> IO t | 45 | ioReadV :: Storable t => Vector t -> Int -> IO t |