Skip to content
Snippets Groups Projects
Commit 9c81eff6 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 ee43fbb9
1 merge request!5170Marge Bot Batch MR - DO NOT TOUCH
Pipeline #32407 failed
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