Commits

Bryan O'Sullivan  committed b537df7

Fix build issues with GHC 7

  • Participants
  • Parent commits 44661f8
  • Tags 0.8.0.4

Comments (0)

Files changed (3)

File Statistics/Function.hs

 
 import Control.Exception (assert)
 import Control.Monad.Primitive (PrimMonad)
-import Data.Vector.Algorithms.Combinators (apply)
-import Data.Vector.Generic (unsafeFreeze)
+import Data.Vector.Generic (modify, unsafeFreeze)
 import qualified Data.Vector.Algorithms.Intro as I
 import qualified Data.Vector.Generic as G
 import qualified Data.Vector.Generic.Mutable as M
 
 -- | Sort a vector.
 sort :: (Ord e, G.Vector v e) => v e -> v e
-sort = apply I.sort
+sort = modify I.sort
 {-# INLINE sort #-}
 
 -- | Partially sort a vector, such that the least /k/ elements will be
                Int -- ^ The number /k/ of least elements.
             -> v e
             -> v e
-partialSort k = apply (\a -> I.partialSort a k)
+partialSort k = modify (\a -> I.partialSort a k)
 {-# INLINE partialSort #-}
 
 -- | Return the indices of a vector.

File Statistics/Sample/Powers.hs

        -> Powers
 powers k
     | k < 2     = error "Statistics.Sample.powers: too few powers"
-    | otherwise = fini . G.foldl' go (unsafePerformIO $ MU.newWith l 0)
+    | otherwise = fini . G.foldl' go (unsafePerformIO $ MU.replicate l 0)
   where
     go ms x = inlinePerformIO $ loop 0 1
         where loop !i !xk | i == l = return ms

File statistics.cabal

 name:           statistics
-version:        0.8.0.3
+version:        0.8.0.4
 synopsis:       A library of statistical types, data, and functions
 description:
   This library provides a number of common functions and types useful
     mwc-random >= 0.7.0.0,
     primitive >= 0.3,
     time,
-    vector >= 0.6.0.2,
-    vector-algorithms >= 0.3.2
+    vector >= 0.7.0.0,
+    vector-algorithms >= 0.4
   if impl(ghc >= 6.10)
     build-depends:
       base >= 4