Vagueness and Learning: A Type-Theoretic Approach