packages feed

vector-algorithms 0.3 → 0.3.1

raw patch · 2 files changed

+8/−5 lines, 2 files

Files

Data/Vector/Algorithms/Intro.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TypeOperators, BangPatterns #-}+{-# LANGUAGE TypeOperators, BangPatterns, ScopedTypeVariables #-}  -- --------------------------------------------------------------------------- -- |@@ -168,16 +168,21 @@   where c = (u + l) `div` 2 {-# INLINE partialSortByBounds #-} -partitionBy :: (PrimMonad m, MVector v e)+partitionBy :: forall m v e. (PrimMonad m, MVector v e)             => Comparison e -> v (PrimState m) e -> e -> Int -> Int -> m Int partitionBy cmp a = partUp  where+ -- 6.10 panics without the signatures for partUp and partDown, 6.12 and later+ -- versions don't need them+ partUp :: e -> Int -> Int -> m Int  partUp p l u    | l < u = do e <- unsafeRead a l                 case cmp e p of                   LT -> partUp p (l+1) u                   _  -> partDown p l (u-1)    | otherwise = return l++ partDown :: e -> Int -> Int -> m Int  partDown p l u    | l < u = do e <- unsafeRead a u                 case cmp p e of
vector-algorithms.cabal view
@@ -1,5 +1,5 @@ Name:              vector-algorithms-Version:           0.3+Version:           0.3.1 License:           BSD3 License-File:      LICENSE Author:            Dan Doel@@ -8,8 +8,6 @@ Category:          Data Synopsis:          Efficient algorithms for vector arrays Description:       Efficient algorithms for vector arrays-                   be sure to compile with -O2, and -fvia-C -optc-O3 is-                   recommended. Build-Type:        Simple Cabal-Version:     >= 1.2.3