Implementations of various algorithms for vector (http://code.haskell.org/~dolio/)

#8Tim.sort is unsafe

compiling vector with unsafechecks: true results in the following out of bounds exception

Prelude> import qualified Data.Vector.Unboxed as U
Prelude U> xs :: [(Double, Int)] <- read <$> readFile "bust_sort.txt"
Prelude U> import qualified Data.Vector.Algorithms.Tim as Tim
Prelude U Tim> U.modify Tim.sort (U.fromList xs)
*** Exception: ./Data/Vector/Generic/Mutable.hs:721 (unsafeRead): index out of bounds (-1,313)
CallStack (from HasCallStack):
  error, called at ./Data/Vector/Internal/Check.hs:87:5 in vector-0.11.0.0-870I7k04VpECBZVwLXe120:Data.Vector.Internal.Check