module Data.Array.Comfort.Shape.Utility where

import Text.Printf (printf)


errorIndexFromOffset :: String -> Int -> a
errorIndexFromOffset :: String -> Int -> a
errorIndexFromOffset String
name Int
k =
   String -> a
forall a. HasCallStack => String -> a
error (String -> a) -> String -> a
forall a b. (a -> b) -> a -> b
$ String -> String -> Int -> String
forall r. PrintfType r => String -> r
printf String
"indexFromOffset (%s): index %d out of range" String
name Int
k