Skip to content

Bring back COMPLETE sets filtered by result TyCon (#14422)

Sebastian Graf requested to merge wip/pmcheck-roll-back-complete-sigs into master

Commit 2a942285 dramatically simplified the implementation and improved the performance of COMPLETE sets while making them applicable in more scenarios at the same time. But it turned out that there was a change in semantics that (to me unexpectedly) broke users' expectations (see #14422): They relied on the "type signature" of a COMPLETE pragma to restrict the scrutinee types of a pattern match for which they are applicable.

This patch brings back that filtering, so the semantic is the same as it was in GHC 9.0.

There are a few testsuite output changes (completesig13, T14422) which assert this change.

Merge request reports