]> gitweb.michael.orlitzky.com - numerical-analysis.git/blobdiff - src/Linear/Matrix.hs
src/Linear/Matrix.hs: define "one" in the ring of matrices.
[numerical-analysis.git] / src / Linear / Matrix.hs
index e8d7180fbc7717ef93ce3eb30ff55332aeef31b5..2d7347230b71281a8ec4562b67e160958e1baf7e 100644 (file)
@@ -604,6 +604,7 @@ instance (Ring.C a, Arity m, Arity n) => Additive.C (Mat m n a) where
 instance (Ring.C a, Arity m, Arity n, m ~ n) => Ring.C (Mat (S m) (S n) a) where
   -- The first * is ring multiplication, the second is matrix
   -- multiplication.
+  one = identity_matrix
   m1 * m2 = m1 * m2