diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2023-05-01 20:03:39 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2023-05-17 13:07:06 -0400 |
commit | 572b711a0d994361a06c0595dbe0698f16100481 (patch) | |
tree | e7455e79386b8cfe54ea726b5a4a0e62601f3e80 /testsuite/tests/deriving/should_compile/all.T | |
parent | c0017ff1af10c285bcdb2def8f88bb631ed90b99 (diff) | |
download | haskell-572b711a0d994361a06c0595dbe0698f16100481.tar.gz |
Fix type variable substitution in gen_Newtype_fam_instswip/backports-9.6
Previously, `gen_Newtype_fam_insts` was substituting the type variable binders
of a type family instance using `substTyVars`, which failed to take type
variable dependencies into account. There is similar code in
`GHC.Tc.TyCl.Class.tcATDefault` that _does_ perform this substitution properly,
so this patch:
1. Factors out this code into a top-level `substATBndrs` function, and
2. Uses `substATBndrs` in `gen_Newtype_fam_insts`.
Fixes #23329.
(cherry picked from commit e8b72ff6e4aee1f889a9168df57bb1b00168fd21)
Diffstat (limited to 'testsuite/tests/deriving/should_compile/all.T')
-rw-r--r-- | testsuite/tests/deriving/should_compile/all.T | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T index 922b7126b7..503c705169 100644 --- a/testsuite/tests/deriving/should_compile/all.T +++ b/testsuite/tests/deriving/should_compile/all.T @@ -140,3 +140,4 @@ test('T20501', normal, compile, ['']) test('T20719', normal, compile, ['']) test('T20994', normal, compile, ['']) test('T22167', normal, compile, ['']) +test('T23329', normal, multimod_compile, ['T23329', '-v0']) |