diff options
author | Sebastian Graf <sgraf1337@gmail.com> | 2023-03-21 17:40:06 +0100 |
---|---|---|
committer | Sebastian Graf <sgraf1337@gmail.com> | 2023-04-06 11:03:54 +0200 |
commit | 0b65d3873b30f87bfe3b9452f8d7432a04baf1ce (patch) | |
tree | 858172f18713f14e56452ac37d3d540df86ab5de /compiler/Language/Haskell/Syntax.hs | |
parent | 73d07c6e1986bd2b3516d4f009cc1e30ba804f06 (diff) | |
download | haskell-wip/T23145.tar.gz |
Pmc: Treat `x ~ y @ty` the same as `x ~ y` (#23145)wip/T23145
In #23145 we had a desugaring that matched on expressions `ds @Any`
and `ds @blah` (where `blah /= Any`). In both cases, we match on the
same value, but Long-distance information was unable to figure this
out.
The fix is rather simple: Upon reasoning about the Core constraint
`x ~ ds @Any`, drop any type arguments to see `x ~ ds`, then we will
equate that to the same as `ds @blah`.
This plays a bit fast-and-loose with types; on the other hand, the
situations in which can give the same value different types should
be exceedingly rare.
Fixes #23145.
Diffstat (limited to 'compiler/Language/Haskell/Syntax.hs')
0 files changed, 0 insertions, 0 deletions