Credit segmentation in general equilibrium