Converting type generation to visitor.