vector 0.10.9.2 → 0.10.9.3
raw patch · 5 files changed
+47/−2 lines, 5 files
Files
- Data/Vector/Primitive.hs +13/−0
- Data/Vector/Storable.hs +14/−0
- Data/Vector/Unboxed.hs +15/−1
- changelog +4/−0
- vector.cabal +1/−1
Data/Vector/Primitive.hs view
@@ -168,6 +168,10 @@ import Data.Monoid ( Monoid(..) ) +#if __GLASGOW_HASKELL__ >= 708+import qualified GHC.Exts as Exts+#endif+ -- | Unboxed vectors of primitive types data Vector a = Vector {-# UNPACK #-} !Int {-# UNPACK #-} !Int@@ -255,6 +259,15 @@ {-# INLINE mconcat #-} mconcat = concat +#if __GLASGOW_HASKELL__ >= 708++instance Prim a => Exts.IsList (Vector a) where+ type Item (Vector a) = a+ fromList = fromList+ fromListN = fromListN+ toList = toList++#endif -- Length -- ------
Data/Vector/Storable.hs view
@@ -173,6 +173,10 @@ import Data.Monoid ( Monoid(..) ) +#if __GLASGOW_HASKELL__ >= 708+import qualified GHC.Exts as Exts+#endif+ #include "vector.h" -- | 'Storable'-based vectors@@ -261,6 +265,16 @@ {-# INLINE mconcat #-} mconcat = concat++#if __GLASGOW_HASKELL__ >= 708++instance Storable a => Exts.IsList (Vector a) where+ type Item (Vector a) = a+ fromList = fromList+ fromListN = fromListN+ toList = toList++#endif -- Length -- ------
Data/Vector/Unboxed.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE Rank2Types #-}+{-# LANGUAGE Rank2Types, TypeFamilies #-} -- | -- Module : Data.Vector.Unboxed@@ -188,6 +188,10 @@ import Data.Monoid ( Monoid(..) ) +#if __GLASGOW_HASKELL__ >= 708+import qualified GHC.Exts as Exts (IsList(..))+#endif+ #include "vector.h" -- See http://trac.haskell.org/vector/ticket/12@@ -231,6 +235,16 @@ instance (Read a, Unbox a) => Read (Vector a) where readPrec = G.readPrec readListPrec = readListPrecDefault++#if __GLASGOW_HASKELL__ >= 708++instance (Unbox e) => Exts.IsList (Vector e) where+ type Item (Vector e) = e+ fromList = fromList+ fromListN = fromListN+ toList = toList++#endif -- Length information -- ------------------
changelog view
@@ -1,3 +1,7 @@+Changes in version 0.10.9.3++ * Add support for OverloadedLists in GHC >= 7.8+ Changes in version 0.10.9.2 * Fix compilation with GHC 7.9
vector.cabal view
@@ -1,5 +1,5 @@ Name: vector-Version: 0.10.9.2+Version: 0.10.9.3 -- don't forget to update the changelog file! License: BSD3 License-File: LICENSE