In his talk “Classes, Jim, but not as we know them” Simon Peyton-Jones talks about how type classes are implemented in GHC by having polymorphic functions taking an extra parameter that is a dictionary with the correct functions for the type(s) given to the function.
He then said that GHC often optimizes functions by special-casing functions and not actually passing this dictionary at runtime. He then said that this is not always possible because Haskell has polymorphic recursion, so even if you have the whole program, you cannot necessarily eliminate all polymorphism.
What did he mean by this? What is an example of a program where one cannot know the types a polymorphic function will be passed at compile time?