Rewrite the hole rule to refine and unification