Improve typechecking rules for pair-patterns