uvector 0.1.0.1 → 0.1.0.2
raw patch · 4 files changed
+35/−34 lines, 4 files
Files
- Data/Array/Vector/Prim/Hyperstrict.hs +1/−1
- Data/Array/Vector/Strict/Stream.hs +1/−0
- Data/Array/Vector/UArr.hs +30/−30
- uvector.cabal +3/−3
Data/Array/Vector/Prim/Hyperstrict.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE TypeOperators, Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Array.Vector.Prim.Hyperstrict
Data/Array/Vector/Strict/Stream.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE Rank2Types #-} {-# LANGUAGE BangPatterns #-} ----------------------------------------------------------------------------- -- |
Data/Array/Vector/UArr.hs view
@@ -419,8 +419,8 @@ unMUAPrim (MUAChar arr) = arr instance UA Char where- newtype UArr Char = UAChar !(BUArr Char)- newtype MUArr Char s = MUAChar !(MBUArr s Char)+ newtype UArr Char = UAChar (BUArr Char)+ newtype MUArr Char s = MUAChar (MBUArr s Char) lengthU = primLengthU indexU = primIndexU@@ -441,8 +441,8 @@ unMUAPrim (MUAInt arr) = arr instance UA Int where- newtype UArr Int = UAInt !(BUArr Int)- newtype MUArr Int s = MUAInt !(MBUArr s Int)+ newtype UArr Int = UAInt (BUArr Int)+ newtype MUArr Int s = MUAInt (MBUArr s Int) lengthU = primLengthU indexU = primIndexU@@ -465,8 +465,8 @@ unMUAPrim (MUAWord arr) = arr instance UA Word where- newtype UArr Word = UAWord !(BUArr Word)- newtype MUArr Word s = MUAWord !(MBUArr s Word)+ newtype UArr Word = UAWord (BUArr Word)+ newtype MUArr Word s = MUAWord (MBUArr s Word) lengthU = primLengthU indexU = primIndexU@@ -488,8 +488,8 @@ unMUAPrim (MUAFloat arr) = arr instance UA Float where- newtype UArr Float = UAFloat !(BUArr Float)- newtype MUArr Float s = MUAFloat !(MBUArr s Float)+ newtype UArr Float = UAFloat (BUArr Float)+ newtype MUArr Float s = MUAFloat (MBUArr s Float) lengthU = primLengthU indexU = primIndexU@@ -510,8 +510,8 @@ unMUAPrim (MUADouble arr) = arr instance UA Double where- newtype UArr Double = UADouble !(BUArr Double)- newtype MUArr Double s = MUADouble !(MBUArr s Double)+ newtype UArr Double = UADouble (BUArr Double)+ newtype MUArr Double s = MUADouble (MBUArr s Double) lengthU = primLengthU indexU = primIndexU@@ -531,8 +531,8 @@ unMUAPrim (MUAWord8 arr) = arr instance UA Word8 where- newtype UArr Word8 = UAWord8 !(BUArr Word8)- newtype MUArr Word8 s = MUAWord8 !(MBUArr s Word8)+ newtype UArr Word8 = UAWord8 (BUArr Word8)+ newtype MUArr Word8 s = MUAWord8 (MBUArr s Word8) lengthU = primLengthU indexU = primIndexU@@ -553,8 +553,8 @@ unMUAPrim (MUAWord16 arr) = arr instance UA Word16 where- newtype UArr Word16 = UAWord16 !(BUArr Word16)- newtype MUArr Word16 s = MUAWord16 !(MBUArr s Word16)+ newtype UArr Word16 = UAWord16 (BUArr Word16)+ newtype MUArr Word16 s = MUAWord16 (MBUArr s Word16) lengthU = primLengthU indexU = primIndexU@@ -573,8 +573,8 @@ unMUAPrim (MUAWord32 arr) = arr instance UA Word32 where- newtype UArr Word32 = UAWord32 !(BUArr Word32)- newtype MUArr Word32 s = MUAWord32 !(MBUArr s Word32)+ newtype UArr Word32 = UAWord32 (BUArr Word32)+ newtype MUArr Word32 s = MUAWord32 (MBUArr s Word32) lengthU = primLengthU indexU = primIndexU@@ -593,8 +593,8 @@ unMUAPrim (MUAWord64 arr) = arr instance UA Word64 where- newtype UArr Word64 = UAWord64 !(BUArr Word64)- newtype MUArr Word64 s = MUAWord64 !(MBUArr s Word64)+ newtype UArr Word64 = UAWord64 (BUArr Word64)+ newtype MUArr Word64 s = MUAWord64 (MBUArr s Word64) lengthU = primLengthU indexU = primIndexU@@ -613,8 +613,8 @@ unMUAPrim (MUAInt8 arr) = arr instance UA Int8 where- newtype UArr Int8 = UAInt8 !(BUArr Int8)- newtype MUArr Int8 s = MUAInt8 !(MBUArr s Int8)+ newtype UArr Int8 = UAInt8 (BUArr Int8)+ newtype MUArr Int8 s = MUAInt8 (MBUArr s Int8) lengthU = primLengthU indexU = primIndexU@@ -635,8 +635,8 @@ unMUAPrim (MUAInt16 arr) = arr instance UA Int16 where- newtype UArr Int16 = UAInt16 !(BUArr Int16)- newtype MUArr Int16 s = MUAInt16 !(MBUArr s Int16)+ newtype UArr Int16 = UAInt16 (BUArr Int16)+ newtype MUArr Int16 s = MUAInt16 (MBUArr s Int16) lengthU = primLengthU indexU = primIndexU@@ -655,8 +655,8 @@ unMUAPrim (MUAInt32 arr) = arr instance UA Int32 where- newtype UArr Int32 = UAInt32 !(BUArr Int32)- newtype MUArr Int32 s = MUAInt32 !(MBUArr s Int32)+ newtype UArr Int32 = UAInt32 (BUArr Int32)+ newtype MUArr Int32 s = MUAInt32 (MBUArr s Int32) lengthU = primLengthU indexU = primIndexU@@ -675,8 +675,8 @@ unMUAPrim (MUAInt64 arr) = arr instance UA Int64 where- newtype UArr Int64 = UAInt64 !(BUArr Int64)- newtype MUArr Int64 s = MUAInt64 !(MBUArr s Int64)+ newtype UArr Int64 = UAInt64 (BUArr Int64)+ newtype MUArr Int64 s = MUAInt64 (MBUArr s Int64) lengthU = primLengthU indexU = primIndexU@@ -694,8 +694,8 @@ instance (RealFloat a, UA a) => UA (Complex a) where - newtype UArr (Complex a) = UAComplex !(UArr (a :*: a))- newtype MUArr (Complex a) s = MUAComplex !(MUArr (a :*: a) s)+ newtype UArr (Complex a) = UAComplex (UArr (a :*: a))+ newtype MUArr (Complex a) s = MUAComplex (MUArr (a :*: a) s) lengthU (UAComplex arr) = lengthU arr @@ -718,8 +718,8 @@ instance (Integral a, UA a) => UA (Ratio a) where- newtype UArr (Ratio a) = UARatio !(UArr (a :*: a))- newtype MUArr (Ratio a) s = MUARatio !(MUArr (a :*: a) s)+ newtype UArr (Ratio a) = UARatio (UArr (a :*: a))+ newtype MUArr (Ratio a) s = MUARatio (MUArr (a :*: a) s) lengthU (UARatio arr) = lengthU arr indexU (UARatio arr) i = case indexU arr i of (a :*: b) -> a % b
uvector.cabal view
@@ -1,5 +1,5 @@ name: uvector-version: 0.1.0.1+version: 0.1.0.2 license: BSD3 license-file: LICENSE author: Manuel Chakravarty, Gabriele Keller, Roman Leshchinskiy, Don Stewart@@ -15,7 +15,7 @@ For best results, compile with your user programs with -O2 -fvia-C -optc-O2. build-type: Simple-stability: experimental+stability: experimental cabal-version: >= 1.2 extra-source-files: include/fusion-phases.h README TODO @@ -72,6 +72,6 @@ if flag(safe) cpp-options: -DSAFE - if impl(ghc >= 6.10)+ if impl(ghc >= 6.9) build-depends: ghc-prim ghc-options: -fno-spec-constr-threshold