If some part of the program is very polymorphic, there
may be no ML type for it. In that case the extraction to ML works
all right but the generated code may be refused by the ML
type-checker. A very well known example is the distr-pair
function:
Definition dp := [A,B:Set][x:A][y:B][f:(C:Set)C->C](f A x,f B y).
In Ocaml, for instance, the extracted term is
let dp x y f = pair((f () x),(f () y))
and has type
dp : 'a -> 'a -> (unit -> 'a -> 'b) -> ('b,'b) prod
which is not its original type, but a restriction.