getNextIdxST :: Monad m => String -> Int -> IdxMonad m Idx
getNextIdxST msg col = do
  curMax <- get
  if col >= (length curMax) then error $ msg ++ ": index too large " ++ (show col) ++ " " ++ (show curMax) else return ()
  return $ (curMax !! col)+1
getNextIdxST :: Monad m => String -> Int -> IdxMonad m Idx
getNextIdxST msg col = do
  curMax <- get
  if col >= (length curMax) then error $ msg ++ ": index too large " ++ (show col) ++ " " ++ (show curMax) else return ()
  return $ (curMax !! col)+1
getNextIdxST msg col = do
  curMax <- get
  if col >= (length curMax) then error $ msg ++ ": index too large " ++ (show col) ++ " " ++ (show curMax) else return ()
  return $ (curMax !! col)+1