Constructing universes for generic programming