The Geometry of Type