matrix-static 0.1.1 → 0.2
raw patch · 3 files changed
+13/−10 lines, 3 files
Files
- ChangeLog.md +3/−0
- matrix-static.cabal +2/−2
- src/Data/Matrix/Static.hs +8/−8
ChangeLog.md view
@@ -1,3 +1,6 @@+# Version 0.2 - 16.10.2018+* Fix bug with the types of splitBlocks (Incompatible change)+ # Version 0.1.1 - 15.10.2018 * Dropped `semigroup` dependency
matrix-static.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: c553d9deb8496047a0389a6bf184d757be92bf8fe4336cb0330d82ba02327fb5+-- hash: 71d0aad7acb4b2fc1986bb9cd9d7f4a861b968f85193c2244ea95a1f321a1e34 name: matrix-static-version: 0.1.1+version: 0.2 synopsis: Type-safe matrix operations description: Please see the README on GitHub at <https://github.com/wchresta/matrix-static#readme> category: Math
src/Data/Matrix/Static.hs view
@@ -857,17 +857,17 @@ -- no way to have a type safe variant of this functon where the pivot element -- is given at run-time. ---splitBlocks :: forall i j m n a.- (KnownNat i, KnownNat j, 1 <= i, i+1 <= m, 1 <= j, j+1 <= n)- => Matrix m n a -- ^ Matrix to split.- -> ( Matrix i j a, Matrix i (n-j) a- , Matrix (n-i) j a, Matrix (m-i) (n-j) a+splitBlocks :: forall mt nl mb nr a.+ (KnownNat mt, KnownNat nl, 1 <= mt, 1 <= mb, 1 <= nl, 1 <= nr)+ => Matrix (mt+mb) (nl+nr) a -- ^ Matrix to split.+ -> ( Matrix mt nl a, Matrix mt nr a+ , Matrix mb nl a, Matrix mb nr a ) -- ^ (TL,TR,BL,BR) {-# INLINE[1] splitBlocks #-} splitBlocks mat =- let i = fromInteger $ natVal @i Proxy- j = fromInteger $ natVal @j Proxy- (x,y,z,w) = M.splitBlocks i j $ unpackStatic mat+ let mt = fromInteger $ natVal @mt Proxy+ nl = fromInteger $ natVal @nl Proxy+ (x,y,z,w) = M.splitBlocks mt nl $ unpackStatic mat in (Matrix x, Matrix y, Matrix z, Matrix w)