summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorSebastian Graf <sgraf1337@gmail.com>2019-09-16 16:52:21 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-28 17:11:41 -0400
commitc5d888d41eb7b39ea0d4c4aabd07ce8133bfeae6 (patch)
tree6561c3d6eaf34ef0e322bb450a0211841752bdd4 /ghc
parent6f9fa0be8d43a7c9618f6e27e3190dc08bf86bfa (diff)
downloadhaskell-c5d888d41eb7b39ea0d4c4aabd07ce8133bfeae6.tar.gz
PmCheck: No ConLike instantiation in pmcheck
`pmcheck` used to call `refineToAltCon` which would refine the knowledge we had about a variable by equating it to a `ConLike` application. Since we weren't particularly smart about this in the Check module, we simply freshened the constructors existential and term binders utimately through a call to `mkOneConFull`. But that instantiation is unnecessary for when we match against a concrete pattern! The pattern will already have fresh binders and field types. So we don't call `refineToAltCon` from `Check` anymore. Subsequently, we can simplify a couple of call sites and functions in `PmOracle`. Also implementing `computeCovered` becomes viable and we don't have to live with the hack that was `addVarPatVecCt` anymore. A side-effect of not indirectly calling `mkOneConFull` anymore is that we don't generate the proper strict argument field constraints anymore. Instead we now desugar ConPatOuts as if they had bangs on their strict fields. This implies that `PmVar` now carries a `HsImplBang` that we need to respect by a (somewhat ephemeral) non-void check. We fix #17234 in doing so.
Diffstat (limited to 'ghc')
0 files changed, 0 insertions, 0 deletions