multiply m1@(Matrix _ c _) m2@(Matrix r _ _)
    | c == r = multiply' m1 m2
    | otherwise = error "multiply: matrix size not match."
multiply m1@(Matrix _ c _) m2@(Matrix r _ _)
    | c == r = multiply' m1 m2
    | otherwise = error "multiply: matrix size not match."
multiply m1@(Matrix _ c _) m2@(Matrix r _ _)
    | c == r = multiply' m1 m2
    | otherwise = error "multiply: matrix size not match."