The easiest way to do this may be to write an alternate implementation of Switch for the literal constant case. 3 outcomes: Handle specific case, do default action or do nothing This is most useful when combined with the inline option.