summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2021-03-05 12:48:57 +0100
committerSebastian Graf <sebastian.graf@kit.edu>2021-03-11 10:13:05 +0100
commit1562b88b24731d745d7c0cf50f96188bcdadcd40 (patch)
tree1abb1e27180591aaeb99f0166abb21b7e976178d /testsuite/tests/rename/should_fail
parentdf8e8ba267ffd7b8be0702bd64b8c39532359461 (diff)
downloadhaskell-wip/T19475.tar.gz
Pmc: Consider Required Constraints when guessing PatSyn arg types (#19475)wip/T19475
This patch makes `guessConLikeUnivTyArgsFromResTy` consider required Thetas of PatSynCons, by treating them as Wanted constraints to be discharged with the constraints from the Nabla's TyState and saying "does not match the match type" if the Wanted constraints are unsoluble. It calls out into a new function `GHC.Tc.Solver.tcCheckWanteds` to do so. In pushing the failure logic around call sites of `initTcDsForSolver` inside it by panicking, I realised that there was a bunch of dead code surrounding `pmTopMoraliseType`: I was successfully able to delete the `NoChange` data constructor of `TopNormaliseTypeResult`. The details are in `Note [Matching against a ConLike result type]` and `Note [Instantiating a ConLike]. The regression test is in `T19475`. It's pretty much a fork of `T14422` at the moment. Co-authored-by: Cale Gibbard <cgibbard@gmail.com>
Diffstat (limited to 'testsuite/tests/rename/should_fail')
0 files changed, 0 insertions, 0 deletions