Generalization and instantiation of types in Hindley-Milner type inference
However, I fail to see what this accomplishes and when you want to do this, and would be very grateful if someone can point me in the right direction.


When you define the function x -> x and first apply it to an integer you don't want the type of that identity function to be specialized to int -> int. That's why you generalize it. Note that this is done at let bindings.