summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 720b011..1ab7e57 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Static.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Static.hs
@@ -225,19 +225,14 @@ class Diag m d | m -> d
225 takeDiag :: m -> d 225 takeDiag :: m -> d
226 226
227 227
228instance forall n . (KnownNat n) => Diag (L n n) (R n) 228instance KnownNat n => Diag (L n n) (R n)
229 where 229 where
230 takeDiag m = mkR (LA.takeDiag (extract m)) 230 takeDiag x = mkR (LA.takeDiag (extract x))
231 231
232 232
233instance forall m n . (KnownNat m, KnownNat n, m <= n+1) => Diag (L m n) (R m) 233instance KnownNat n => Diag (M n n) (C n)
234 where 234 where
235 takeDiag m = mkR (LA.takeDiag (extract m)) 235 takeDiag x = mkC (LA.takeDiag (extract x))
236
237
238instance forall m n . (KnownNat m, KnownNat n, n <= m+1) => Diag (L m n) (R n)
239 where
240 takeDiag m = mkR (LA.takeDiag (extract m))
241 236
242 237
243-------------------------------------------------------------------------------- 238--------------------------------------------------------------------------------