I have a problem with a haskell program. I want to do something like this:
main = do
print $ map foo [(1, [(2, 3), (4,5)])]
foo :: (Int, [(Int, Int)]) ->
It is not an error, it is a warning, telling you that there are some cases in which none of your patterns in foo will apply. If no pattern is matched, the programme will quit with an error, therefore it gives you this warning.
You may choose to ignore this warning if you're 100% sure that this pattern is always matched. Your match in foo will fail if the second part of the pair contains != 1 list elements. I am quite sure you meant to do something like this:
foo (a, l) = (a+1, l)
To copy the given list.