packages feed

linear 1.18 → 1.18.0.1

raw patch · 5 files changed

+20/−6 lines, 5 filesdep ~base

Dependency ranges changed: base

Files

CHANGELOG.markdown view
@@ -1,3 +1,8 @@+1.18.0.1+--------+* Fixed the test suite.+* Fixed builds on older GHCs.+ 1.18 ---- * Consolidated `eye2` .. `eye4` into a single `identity` combinator.
linear.cabal view
@@ -1,6 +1,6 @@ name:          linear category:      Math, Algebra-version:       1.18+version:       1.18.0.1 license:       BSD3 cabal-version: >= 1.8 license-file:  LICENSE
src/Linear/Matrix.hs view
@@ -75,6 +75,7 @@ -- >>> import Data.Complex -- >>> import Data.IntMap -- >>> import Debug.SimpleReflect.Vars+-- >>> import Linear.V  infixl 7 !*! -- | Matrix product. This can compute any combination of sparse and dense multiplication.@@ -227,8 +228,6 @@ -- V4 (V4 1 0 0 0) (V4 0 1 0 0) (V4 0 0 1 0) (V4 0 0 0 1) -- >>> identity :: V3 (V3 Int) -- V3 (V3 1 0 0) (V3 0 1 0) (V3 0 0 1)--- >>> identity :: V 2 (V 2 Int)--- V (fromList [V (fromList [1, 0]), V (fromList [0, 1])) identity :: (Num a, Traversable t, Applicative t) => t (t a) identity = scaled (pure 1) 
src/Linear/V.hs view
@@ -92,6 +92,7 @@ type role V nominal representational #endif + newtype V n a = V { toVector :: V.Vector a } deriving (Eq,Ord,Show,Read,Typeable,NFData                                                       , Generic -- GHC bug: https://ghc.haskell.org/trac/ghc/ticket/8468@@ -368,7 +369,11 @@ vDataType = mkDataType "Linear.V.V" [vConstr] {-# NOINLINE vDataType #-} -instance (Typeable (V n), Typeable (V n a), Dim n, Data a) => Data (V n a) where+#if __GLASGOW_HASKELL__ >= 708+#define Typeable1 Typeable+#endif++instance (Typeable1 (V n), Typeable (V n a), Dim n, Data a) => Data (V n a) where   gfoldl f z (V as) = z (V . fromList) `f` V.toList as   toConstr _ = vConstr   gunfold k z c = case constrIndex c of
src/Linear/V0.hs view
@@ -79,8 +79,13 @@ #endif                         ) -instance Serial1 V0-instance Serial (V0 a)+instance Serial1 V0 where+  serializeWith f = serialize+  deserializeWith f = deserialize++instance Serial (V0 a) where+  serialize V0 = return ()+  deserialize = return V0  instance Binary (V0 a) where   put V0 = return ()