summaryrefslogtreecommitdiff
path: root/packages/base
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Static.hs13
1 files changed, 4 insertions, 9 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Static.hs b/packages/base/src/Numeric/LinearAlgebra/Static.hs
index 6d828d7..e18ba0c 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Static.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Static.hs
@@ -226,19 +226,14 @@ class Diag m d | m -> d
226 takeDiag :: m -> d 226 takeDiag :: m -> d
227 227
228 228
229instance forall n . (KnownNat n) => Diag (L n n) (R n) 229instance KnownNat n => Diag (L n n) (R n)
230 where 230 where
231 takeDiag m = mkR (LA.takeDiag (extract m)) 231 takeDiag x = mkR (LA.takeDiag (extract x))
232 232
233 233
234instance forall m n . (KnownNat m, KnownNat n, m <= n+1) => Diag (L m n) (R m) 234instance KnownNat n => Diag (M n n) (C n)
235 where 235 where
236 takeDiag m = mkR (LA.takeDiag (extract m)) 236 takeDiag x = mkC (LA.takeDiag (extract x))
237
238
239instance forall m n . (KnownNat m, KnownNat n, n <= m+1) => Diag (L m n) (R n)
240 where
241 takeDiag m = mkR (LA.takeDiag (extract m))
242 237
243 238
244-------------------------------------------------------------------------------- 239--------------------------------------------------------------------------------