Refine variant types depending on generator.