A unified system of type refinements