[commit: vector] simd: Strictness fix (ecd9b71)

Geoffrey Mainland gmainlan at ghc.haskell.org
Fri Jul 19 14:23:20 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : simd

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

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

commit ecd9b7169bf0b8d656a3b78a4a3212e120c53097
Author: Roman Leshchinskiy <rl at cse.unsw.edu.au>
Date:   Sat Jan 7 10:25:18 2012 +0000

    Strictness fix

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

 Data/Vector/Primitive.hs |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Data/Vector/Primitive.hs b/Data/Vector/Primitive.hs
index 1fe3677..5f0e62e 100644
--- a/Data/Vector/Primitive.hs
+++ b/Data/Vector/Primitive.hs
@@ -205,7 +205,7 @@ instance Prim a => G.Vector Vector a where
   basicUnsafeSlice j n (Vector i _ arr) = Vector (i+j) n arr
 
   {-# INLINE basicUnsafeIndexM #-}
-  basicUnsafeIndexM (Vector i _ arr) j = return (indexByteArray arr (i+j))
+  basicUnsafeIndexM (Vector i _ arr) j = return $! indexByteArray arr (i+j)
 
   {-# INLINE basicUnsafeCopy #-}
   basicUnsafeCopy (MVector i n dst) (Vector j _ src)






More information about the ghc-commits mailing list