Type functions and ambiguity