I wrote the function pop as follows:
pop :: Int n => [a] -> n -> a
pop xs n = head $ drop n xs
When trying to run it, I get an error saying:
Expected kind '* -> Constraint', but 'Int' has kind '*'
However, changing the signature to
pop :: [a] -> Int -> a
Solves the issue. Why does this happen?