PrimitiveArray 0.0.2.1 → 0.0.2.2
raw patch · 3 files changed
+14/−3 lines, 3 files
Files
- Data/PrimitiveArray.hs +4/−2
- Data/PrimitiveArray/Ix.hs +5/−0
- PrimitiveArray.cabal +5/−1
Data/PrimitiveArray.hs view
@@ -19,7 +19,8 @@ -- * The PrimArray class. class PrimArrayOps a b where- data PrimArray a b :: * -- ^ PrimArray data type+ -- | PrimArray data type+ data PrimArray a b :: * unsafeIndex :: PrimArray a b -> a -> b -- ^ Index an array without bounds-checking assocs :: PrimArray a b -> [(a,b)] -- ^ All associations of (key,value) fromAssocs :: a -> a -> b -> [(a,b)] -> PrimArray a b -- ^ Pure build function@@ -30,7 +31,8 @@ class (PrimMonad s) => PrimArrayOpsM a b s where- data PrimArrayM a b s :: * -- ^ Monadic data type+ -- | Monadic data type+ data PrimArrayM a b s :: * readM :: PrimArrayM a b s -> a -> s b -- ^ Monadic read writeM :: PrimArrayM a b s -> a -> b -> s () -- ^ Monadic write boundsM :: PrimArrayM a b s -> s (a,a) -- ^ Monadic bounds
Data/PrimitiveArray/Ix.hs view
@@ -4,6 +4,11 @@ {-# LANGUAGE MultiParamTypeClasses #-} -- | PrimitiveArray with 'Ix' keys.+--+-- NOTE GHC 6.12.3 (and earlier, I guess) does not produce optimal code.+-- Current head (6.13) produces very nice code. For example, 'unsafeIndex' for+-- 2-dim. tables with lower bound (0,0) produces one multiplication, one+-- addition, one lookup, all using machine Int's. module Data.PrimitiveArray.Ix where
PrimitiveArray.cabal view
@@ -1,9 +1,11 @@ Name: PrimitiveArray-Version: 0.0.2.1+Version: 0.0.2.2 License: BSD3 License-file: LICENSE Author: Christian Hoener zu Siederdissen Maintainer: choener@tbi.univie.ac.at+Copyright: Christian Hoener zu Siederdissen, 2010+Homepage: http://www.tbi.univie.ac.at/~choener/Haskell/ Stability: Experimental Category: Data Build-type: Simple@@ -14,6 +16,8 @@ Description: Provides unboxed multidimensional tables with a small interface. Comes with an instance for Ix keys.+ .+ * haddock should work now extra-source-files: Benchmarks/Index.hs