{-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} module Data.Array.Ranked.MatMul(matMul) where import GHC.Stack import Data.Array.Convert import Data.Array.Ranked import qualified Data.Array.RankedS.MatMul as S import Numeric.LinearAlgebra as N matMul :: forall a . (HasCallStack, N.Numeric a) => Array 2 a -> Array 2 a -> Array 2 a matMul :: Array 2 a -> Array 2 a -> Array 2 a matMul Array 2 a x Array 2 a y = Array 2 a -> Array 2 a forall a b. Convert a b => a -> b convert (Array 2 a -> Array 2 a) -> Array 2 a -> Array 2 a forall a b. (a -> b) -> a -> b $ Array 2 a -> Array 2 a -> Array 2 a forall a. (HasCallStack, Numeric a) => Array 2 a -> Array 2 a -> Array 2 a S.matMul (Array 2 a -> Array 2 a forall a b. Convert a b => a -> b convert Array 2 a x) (Array 2 a -> Array 2 a forall a b. Convert a b => a -> b convert Array 2 a y)