{-# LANGUAGE TypeFamilies #-} module Numeric.LAPACK.Matrix.Shape.Box where import qualified Data.Array.Comfort.Shape as Shape class (Shape.C shape) => Box shape where type HeightOf shape type WidthOf shape height :: shape -> HeightOf shape width :: shape -> WidthOf shape indices :: (Box shape, HeightOf shape ~ height, Shape.Indexed height, WidthOf shape ~ width, Shape.Indexed width) => shape -> [(Shape.Index height, Shape.Index width)] indices sh = Shape.indices (height sh, width sh)