packages feed

linear 1.21.9 → 1.21.10

raw patch · 3 files changed

+12/−3 lines, 3 filesdep ~vectorPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: vector

API changes (from Hackage documentation)

Files

CHANGELOG.markdown view
@@ -1,3 +1,7 @@+1.21.10 [2022.06.21]+--------------------+* Allow building with `vector-0.13.*`.+ 1.21.9 [2022.05.18] ------------------- * Allow building with `transformers-0.6.*`.
linear.cabal view
@@ -1,6 +1,6 @@ name:          linear category:      Math, Algebra-version:       1.21.9+version:       1.21.10 license:       BSD3 cabal-version: >= 1.10 license-file:  LICENSE@@ -68,7 +68,7 @@     transformers         >= 0.5   && < 0.7,     transformers-compat  >= 0.5.0.4 && < 1,     unordered-containers >= 0.2.3 && < 0.3,-    vector               >= 0.12.1.2 && < 0.13,+    vector               >= 0.12.1.2 && < 0.14,     void                 >= 0.6   && < 1    if flag(template-haskell) && impl(ghc)
src/Linear/V.hs view
@@ -85,6 +85,7 @@ import qualified Data.Traversable.WithIndex as WithIndex import qualified Data.Vector as V import Data.Vector (Vector)+import Data.Vector.Fusion.Util (Box(..)) import qualified Data.Vector.Generic as G import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Generic.Mutable as M@@ -549,11 +550,15 @@     go v vn d o j       | j >= d = return ()       | otherwise = do-        a <- G.basicUnsafeIndexM vn j+        a <- liftBox $ G.basicUnsafeIndexM vn j         M.basicUnsafeWrite v o a         go v vn d (o+1) (j+1)   basicInitialize (MV_VN _ v) = M.basicInitialize v   {-# INLINE basicInitialize #-}++liftBox :: Monad m => Box a -> m a+liftBox (Box a) = return a+{-# INLINE liftBox #-}  instance (Dim n, U.Unbox a) => G.Vector U.Vector (V n a) where   {-# INLINE basicUnsafeFreeze #-}