Fix #14135 by validity checking matches
We filter the complete patterns given in a COMPLETE set to only those that subsume the type we are matching. Otherwise we end up introducing an ill-typed equation into the overlap checking, provoking a crash. This was the cause of Trac #14135. Reviewers: austin, bgamari, mpickering, gkaracha, simonpj, RyanGlScott, carlostome Reviewed By: bgamari Subscribers: carter, dfeuer, RyanGlScott, goldfire, rwbarton, thomie GHC Trac Issues: #14135 Differential Revision: https://phabricator.haskell.org/D3981
Showing
- compiler/deSugar/Check.hs 17 additions, 9 deletionscompiler/deSugar/Check.hs
- testsuite/tests/deSugar/should_compile/T14135.hs 16 additions, 0 deletionstestsuite/tests/deSugar/should_compile/T14135.hs
- testsuite/tests/deSugar/should_compile/T14135.stderr 4 additions, 0 deletionstestsuite/tests/deSugar/should_compile/T14135.stderr
- testsuite/tests/deSugar/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/deSugar/should_compile/all.T
Loading
Please register or sign in to comment