Pattern matching for product ADTs