I'm dabbling in some Haskell and have stumbled upon a bump in the road

I want to write a function that an AI uses to choose a row in a simple board game. The board in said game is represented by a list of integers. Like this:

```
board = [1,2,3,4,5]

```

The index + 1 of the numbers in the row on the board and the `Int` itself is the number of pieces left on said row. How I aim to make this function work is by first to find the largest number in the list and then return (index + 1) of this number in the form of an `IO Int`. 

This is where I'm struggling since I can't seem to find any good answer to this online

This is what I'm working with so far:

```
-- Returns index of row with largest number along the number itself
aiHelper :: Board -> (Int, Int)
aiHelper xs = maximumBy (comparing fst) (zip xs [1..])

-- Returns row with largest number as IO Int
aiRow :: Board -> IO Int
aiRow xs = do
              let y = snd $ aiHelper xs
              return $ y

```

I'm not quite sure if this code does what I'm looking for, and is there an easier and cleaner solution to my code?