add (Matrix r1 c1 v1) (Matrix r2 c2 v2)
    | r1 == r2 && c1 == c2 = Matrix r1 c1 $ V.zipWith (+) v1 v2
    | otherwise = error "add: matrix size not match."
add (Matrix r1 c1 v1) (Matrix r2 c2 v2)
    | r1 == r2 && c1 == c2 = Matrix r1 c1 $ V.zipWith (+) v1 v2
    | otherwise = error "add: matrix size not match."
add (Matrix r1 c1 v1) (Matrix r2 c2 v2)
    | r1 == r2 && c1 == c2 = Matrix r1 c1 $ V.zipWith (+) v1 v2
    | otherwise = error "add: matrix size not match."