Repository : ssh://darcs.haskell.org//srv/darcs/packages/dph

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/e97202897776ea5efe627ec6d4ef0aef2c9b0d85

>---------------------------------------------------------------

commit e97202897776ea5efe627ec6d4ef0aef2c9b0d85
Author: Ben Lippmeier <[email protected]>
Date:   Tue May 3 16:42:00 2011 +1000

    Fix bug with slicePA. The second argument should be the slice length, not 
the last index of the slice.

>---------------------------------------------------------------

 .../Data/Array/Parallel/Lifted/Combinators.hs      |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dph-common/Data/Array/Parallel/Lifted/Combinators.hs 
b/dph-common/Data/Array/Parallel/Lifted/Combinators.hs
index 75b3905..d17d962 100644
--- a/dph-common/Data/Array/Parallel/Lifted/Combinators.hs
+++ b/dph-common/Data/Array/Parallel/Lifted/Combinators.hs
@@ -379,8 +379,8 @@ indexedPA = closure1 indexedPA_v indexedPA_l
 -- slice ----------------------------------------------------------------------
 slicePA_v :: PA a => Int -> Int -> PArray a -> PArray a
 {-# INLINE slicePA_v #-}
-slicePA_v (I# from) (I# to) xs 
-  = extractPA# xs from (to -# from) 
+slicePA_v (I# from) (I# len) xs 
+  = extractPA# xs from len 
 
 -- TODO: Can we define this in terms of extractPA?
 slicePA_l :: PA a => PArray Int -> PArray Int -> PArray (PArray a) -> PArray 
(PArray a)



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to