Invert the precedence of | and when

Although this adds some drawbacks when it comes to typespecs,
it prepares us for when we have named patterns.