Add contexts to instance declarations