Skip to content
Snippets Groups Projects
Commit 4cdf8b5e authored by cgibbard's avatar cgibbard Committed by Marge Bot
Browse files

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


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 semantics is the same as
it was in GHC 9.0.
See the updated Note [Implementation of COMPLETE pragmas].

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

Co-authored-by: default avatarSebastian Graf <sebastian.graf@kit.edu>
parent 1a52c53b
No related branches found
No related tags found
No related merge requests found
Showing
with 220 additions and 58 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment