packages feed

carray 0.1.6.3 → 0.1.6.4

raw patch · 6 files changed

+32/−29 lines, 6 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Array.CArray.Base: instance (Data.Data.Data i, Data.Data.Data e) => Data.Data.Data (Data.Array.CArray.Base.CArray i e)
- Data.Array.CArray.Base: instance (Data.Data.Data i, Data.Data.Data e) => Data.Data.Data (Data.Array.CArray.Base.IOCArray i e)
+ Data.Array.CArray.Base: instance (Data.Data.Data e, Data.Data.Data i) => Data.Data.Data (Data.Array.CArray.Base.CArray i e)
+ Data.Array.CArray.Base: instance (Data.Data.Data e, Data.Data.Data i) => Data.Data.Data (Data.Array.CArray.Base.IOCArray i e)

Files

Makefile view
@@ -2,5 +2,5 @@ 	runhaskell Setup configure --user --enable-tests --enable-benchmarks 	runhaskell Setup build 	runhaskell Setup haddock-	./dist/build/test/test+	runhaskell Setup test --show-details=always 	(cd tests; sh runtests.sh)
carray.cabal view
@@ -1,12 +1,12 @@ name:                carray-version:             0.1.6.3+version:             0.1.6.4 synopsis:            A C-compatible array library. description:   A C-compatible array library.   .   Provides both an immutable and mutable (in the IO monad) interface.   Includes utilities for multi-dimensional arrays, slicing and norms.-  Memory is 16-byte aligned by default to enable use of SIMD instructions.+  Memory is 16-byte aligned by default to enable use of vector instructions. category:            Data license:             BSD3 license-file:        LICENSE@@ -21,7 +21,7 @@   Makefile  source-repository this-  tag:         0.1.6.3+  tag:         0.1.6.4   type:        darcs   location:    http://hub.darcs.net/thielema/carray/ 
src/Data/Array/CArray/Base.hs view
@@ -171,7 +171,9 @@                     !(fp0, off, len) = S.toForeignPtr bs                     fp = mapPtr (flip plusPtr off) fp0                     p = unsafeForeignPtrToPtr fp-                    safe = sizeOf dummy * n <= len && p == p `alignPtr` alignment dummy+                    safe =+                        sizeOf dummy * n <= len &&+                        p == p `alignPtr` alignment dummy           mapPtr :: (Ptr a -> Ptr b) -> ForeignPtr a -> ForeignPtr b           mapPtr f (ForeignPtr addr contents) =               case f $ Ptr addr of
tests/meteor-contest-c.hs view
@@ -1,5 +1,5 @@ {-# OPTIONS -O2 -optc-O3 #-}-{-# LANGUAGE BangPatterns#-}+{-# LANGUAGE BangPatterns #-}  -- The Computer Language Benchmarks Game --   http://shootout.alioth.debian.org/@@ -34,6 +34,7 @@ cellAt :: Int -> Int -> Int cellAt x y = x + n_col * y +-- swap coordOf :: Int -> (Int, Int) coordOf i = snd &&& fst $ i `quotRem` n_col @@ -51,15 +52,15 @@ pieces :: Array Int Piece pieces = array (0,9) $ zip [0..9] $          [[E,  E,  E,  SE],-	  [SE, SW, W,  SW],-	  [W,  W,  SW, SE],-	  [E,  E,  SW, SE],-	  [NW, W,  NW, SE, SW],-	  [E,  E,  NE, W],-	  [NW, NE, NE, W],-	  [NE, SE, E,  NE],-	  [SE, SE, E,  SE],-	  [E,  NW, NW, NW]]+          [SE, SW, W,  SW],+          [W,  W,  SW, SE],+          [E,  E,  SW, SE],+          [NW, W,  NW, SE, SW],+          [E,  E,  NE, W],+          [NW, NE, NE, W],+          [NE, SE, E,  NE],+          [SE, SE, E,  SE],+          [E,  NW, NW, NW]]  permutations :: Piece -> [Piece] permutations = take 12 . perms@@ -223,7 +224,7 @@       test (r, m) = n' >= 0 && n' < 25 &&  m `testBit` n'           where n' = n - (n_col * r) -trps :: [[[Mask]]] -> Array (Row, Col) (Array Color [Mask])+trps :: [[masks]] -> Array (Row, Col) (Array Color masks) trps !a = array ((0,0),(9,4)) $ concatMap (uncurry (map . first . (,))) $           zip [0..9] [copy !! y | y <- [1,0,1,0,1,2,3,4,5,6]]     where
tests/meteor-contest-u.hs view
@@ -1,5 +1,5 @@ {-# OPTIONS -O2 -optc-O3 #-}-{-# LANGUAGE BangPatterns#-}+{-# LANGUAGE BangPatterns #-}  -- The Computer Language Benchmarks Game --   http://shootout.alioth.debian.org/@@ -51,15 +51,15 @@ pieces :: Array Int Piece pieces = array (0,9) $ zip [0..9] $          [[E,  E,  E,  SE],-	  [SE, SW, W,  SW],-	  [W,  W,  SW, SE],-	  [E,  E,  SW, SE],-	  [NW, W,  NW, SE, SW],-	  [E,  E,  NE, W],-	  [NW, NE, NE, W],-	  [NE, SE, E,  NE],-	  [SE, SE, E,  SE],-	  [E,  NW, NW, NW]]+          [SE, SW, W,  SW],+          [W,  W,  SW, SE],+          [E,  E,  SW, SE],+          [NW, W,  NW, SE, SW],+          [E,  E,  NE, W],+          [NW, NE, NE, W],+          [NE, SE, E,  NE],+          [SE, SE, E,  SE],+          [E,  NW, NW, NW]]  permutations :: Piece -> [Piece] permutations = take 12 . perms@@ -223,7 +223,7 @@       test (r, m) = n' >= 0 && n' < 25 &&  m `testBit` n'           where n' = n - (n_col * r) -trps :: [[[Mask]]] -> Array (Row, Col) (Array Color [Mask])+trps :: [[masks]] -> Array (Row, Col) (Array Color masks) trps !a = array ((0,0),(9,4)) $ concatMap (uncurry (map . first . (,))) $           zip [0..9] [copy !! y | y <- [1,0,1,0,1,2,3,4,5,6]]     where
tests/tests.hs view
@@ -122,9 +122,9 @@             QC.quickCheckWith (QC.stdArgs {QC.maxSuccess = n}) a     mapM_ mycheck ca_tests     mapM_ mycheck [ ("amap"        , prop_amap) ]-    mapM_ mycheck [ ("accum"       , prop_accum) ]+--    mapM_ mycheck [ ("accum"       , prop_accum) ]     mapM_ mycheck [ ("composeAssoc", prop_composeAssoc) ]     mapM_ mycheck [ ("slice all"         , prop_slice_all)-                  , ("ixmapWithInd amap" , prop_ixmapWithInd_amap) ]+                 {- , ("ixmapWithInd amap" , prop_ixmapWithInd_amap) -} ]  -- arb n k = generate n (mkStdGen k) arbitrary