summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2019-07-31 10:32:32 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-08-02 08:15:25 -0400
commit93bed40a0efdcb0ecea2406c22c402896e4ecfd8 (patch)
tree303dc3f6bca3a5663790acfabd3fd0f251136a9d /compiler/codeGen
parent1b9d32b8b8d55335bed7fb3677054327c6072768 (diff)
downloadhaskell-93bed40a0efdcb0ecea2406c22c402896e4ecfd8.tar.gz
Use injectiveVarsOfType to catch dodgy type family instance binders (#17008)
Previously, we detected dodgy type family instances binders by expanding type synonyms (via `exactTyCoVarsOfType`) and looking for type variables on the RHS that weren't mentioned on the (expanded) LHS. But this doesn't account for type families (like the example in #17008), so we instead use `injectiveVarsOfType` to only count LHS type variables that are in injective positions. That way, the `a` in `type instance F (x :: T a) = a` will not count if `T` is a type synonym _or_ a type family. Along the way, I moved `exactTyCoVarsOfType` to `TyCoFVs` to live alongside its sibling functions that also compute free variables. Fixes #17008.
Diffstat (limited to 'compiler/codeGen')
0 files changed, 0 insertions, 0 deletions