Can these pattern matches be unified?