linear 1.9.0.1 → 1.9.1
raw patch · 3 files changed
+10/−2 lines, 3 files
Files
- CHANGELOG.markdown +4/−0
- linear.cabal +1/−1
- src/Linear/V.hs +5/−1
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+1.9.1+-----+* Added a role annotation to `V n a` to prevent users from using GHC 7.8's `Coercible` machinery to violate invariants.+ 1.9.0.1 ----- * Fixed a broken build
linear.cabal view
@@ -1,6 +1,6 @@ name: linear category: Math, Algebra-version: 1.9.0.1+version: 1.9.1 license: BSD3 cabal-version: >= 1.8 license-file: LICENSE
src/Linear/V.hs view
@@ -9,6 +9,7 @@ #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 707 {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-}+{-# LANGUAGE RoleAnnotations #-} #define USE_TYPE_LITS 1 #endif #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702@@ -74,6 +75,10 @@ class Dim n where reflectDim :: p n -> Int +#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 707+type role V nominal representational+#endif+ newtype V n a = V { toVector :: V.Vector a } deriving (Eq,Ord,Show,Read #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702 ,Generic@@ -83,7 +88,6 @@ ,Generic1 #endif )- dim :: forall n a. Dim n => V n a -> Int dim _ = reflectDim (Proxy :: Proxy n) {-# INLINE dim #-}