summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2019-12-05 02:23:27 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-12-10 19:54:34 -0500
commit921d32381a0bdd693935aa2bada3cd76870bf2f9 (patch)
tree5a33781ff532bd4e682584c5d7a227b26a608a4b /.gitlab
parent843ceb3892432b28628e4b4bad2c712ca371d02b (diff)
downloadhaskell-921d32381a0bdd693935aa2bada3cd76870bf2f9.tar.gz
Ignore unary constraint tuples during typechecking (#17511)
We deliberately avoid defining a magical `Unit%` class, for reasons that I have expounded upon in the newly added `Note [Ignore unary constraint tuples]` in `TcHsType`. However, a sneaky user could try to insert `Unit%` into their program by way of Template Haskell, leading to the interface-file error observed in #17511. To avoid this, any time we encounter a unary constraint tuple during typechecking, we drop the surrounding constraint tuple application. This is safe to do since `Unit% a` and `a` would be semantically equivalent (unlike other forms of unary tuples). Fixes #17511.
Diffstat (limited to '.gitlab')
0 files changed, 0 insertions, 0 deletions