storablevector 0.2.7.1 → 0.2.7.2
raw patch · 8 files changed
+10/−21 lines, 8 files
Files
- Data/StorableVector/Base.hs +1/−1
- Data/StorableVector/Cursor.hs +2/−11
- Data/StorableVector/Lazy.hs +2/−1
- Data/StorableVector/Lazy/Builder.hs +2/−2
- Data/StorableVector/Pointer.hs +1/−1
- Data/StorableVector/ST/Private.hs +0/−2
- Data/StorableVector/ST/Strict.hs +0/−1
- storablevector.cabal +2/−2
Data/StorableVector/Base.hs view
@@ -56,7 +56,7 @@ #if defined(__GLASGOW_HASKELL__) import Data.Generics (Data(..), Typeable(..)) import GHC.Base (realWorld#)-import GHC.IOBase (IO(IO), )+import GHC.IO (IO(IO), ) #endif import System.IO.Unsafe (unsafePerformIO, )
Data/StorableVector/Cursor.hs view
@@ -31,7 +31,7 @@ I hope that this is more efficient. With this restriction @s@ cannot be e.g. a function type but this would kill performance anyway.-Functions that need this flexibility may fall back to other data structures+Functions which need this flexibility may fall back to other data structures (lists or chunky StorableVectors) and convert to the Cursor structure later. -} -- | Cf. StreamFusion Data.Stream@@ -50,7 +50,7 @@ Buffer { memory :: {-# UNPACK #-} !(ForeignPtr a), size :: {-# UNPACK #-} !Int, -- size of allocated memory, I think I only need it for debugging- gen :: {-# UNPACK #-} !(Generator a), -- we need this indirection for the existential type in Generator+ gen :: {-# UNPACK #-} !(Generator a), cursor :: {-# UNPACK #-} !(IORef Int) } @@ -156,9 +156,6 @@ {-# INLINE cons #-} {- | This is expensive and should not be used to construct lists iteratively!-A recursion-enabling 'cons' would be 'consN'-that allocates a buffer of given size,-initializes the leading cell and sets the buffer pointer to the next cell. -} cons :: Storable a => a -> Vector a -> Vector a@@ -224,12 +221,6 @@ withForeignPtr p (\q -> pokeElemOff q c a) >> return (Just a) -{--It is tempting to turn this into a simple loop without the IORefs.-This could be compiled to an efficient strict loop,-but it would fail if the vector content depends on its own,-like in @fix (consN 1000 'a')@.--} -- | evaluate all values up to a given position evaluateToIO :: Storable a => Int -> Buffer a -> IO ()
Data/StorableVector/Lazy.hs view
@@ -20,7 +20,7 @@ import qualified Data.List.HT as ListHT import Data.Tuple.HT (mapPair, mapFst, mapSnd, ) import Data.Maybe.HT (toMaybe, )-import Data.Maybe (Maybe(Just), maybe, fromMaybe, )+import Data.Maybe (fromMaybe, ) import Foreign.Storable (Storable) @@ -45,6 +45,7 @@ import qualified Prelude as P {-+import Data.Maybe (Maybe(Just), maybe, fromMaybe, ) import Prelude (Int, IO, ($), (.), fst, snd, id, error, Char, Num, Show, showsPrec, FilePath,
Data/StorableVector/Lazy/Builder.hs view
@@ -18,9 +18,9 @@ import qualified Data.StorableVector as SV import qualified Data.StorableVector.Lazy as SVL import qualified Data.StorableVector.ST.Strict as STV-import qualified Data.StorableVector.ST.Lazy as STVL+-- import qualified Data.StorableVector.ST.Lazy as STVL -import Data.StorableVector.Lazy (ChunkSize(ChunkSize), )+import Data.StorableVector.Lazy (ChunkSize, ) import Control.Monad (liftM2, ) import Control.Monad.ST.Strict (ST, runST, unsafeInterleaveST, ) import Data.Monoid (Monoid(mempty, mappend), )
Data/StorableVector/Pointer.hs view
@@ -12,7 +12,7 @@ import qualified Foreign.ForeignPtr as FPtr import Foreign.Marshal.Array (advancePtr, ) import Foreign.Storable (Storable, peek, )-import Foreign (Ptr, ForeignPtr, )+import Foreign (Ptr, ) -- import System.IO.Unsafe (unsafePerformIO, )
Data/StorableVector/ST/Private.hs view
@@ -10,11 +10,9 @@ module Data.StorableVector.ST.Private where import qualified Data.StorableVector.Base as V-import qualified Data.StorableVector as VS import Data.StorableVector.Memory (mallocForeignPtrArray, ) -import qualified Control.Monad.ST.Strict as ST import Control.Monad.ST.Strict (ST, unsafeIOToST, ) -- stToIO, import Foreign.Ptr (Ptr, )
Data/StorableVector/ST/Strict.hs view
@@ -37,7 +37,6 @@ import qualified Data.StorableVector as VS import qualified Data.StorableVector.Lazy as VL -import qualified Control.Monad.ST.Strict as ST import Control.Monad.ST.Strict (ST, unsafeIOToST, runST, ) -- stToIO, import Foreign.Ptr (Ptr, )
storablevector.cabal view
@@ -1,5 +1,5 @@ Name: storablevector-Version: 0.2.7.1+Version: 0.2.7.2 Category: Data Synopsis: Fast, packed, strict storable arrays with a list interface like ByteString Description:@@ -51,7 +51,7 @@ Source-Repository this type: darcs location: http://code.haskell.org/storablevector/- tag: 0.2.7.1+ tag: 0.2.7.2 Library Build-Depends: