diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-02-21 13:29:16 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-02-21 14:26:57 +0000 |
commit | 713ebd7cf03876c6bedc1be9fba8f60ccc5bc8f0 (patch) | |
tree | 8aa42a785d1ea8ee84b69ca091c09ac4ef8d6aba /testsuite/tests/deriving | |
parent | fd841f877ab7a991f667a50b401404927f6f599c (diff) | |
download | haskell-713ebd7cf03876c6bedc1be9fba8f60ccc5bc8f0.tar.gz |
Fix computation of dfun_tvs in mkNewTypeEqn
This bug was causing Trac #13297.
We were recomputing ds_tvs, and doing it wrongly (by omitting
variables that appear only in mtheta). But actually plain 'tvs'
is just fine. So code deleted, and bug fixed.
Diffstat (limited to 'testsuite/tests/deriving')
-rw-r--r-- | testsuite/tests/deriving/should_compile/T13297.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_compile/all.T | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T13297.hs b/testsuite/tests/deriving/should_compile/T13297.hs new file mode 100644 index 0000000000..604a64971f --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T13297.hs @@ -0,0 +1,9 @@ +{-# Language TypeFamilies, StandaloneDeriving, GeneralizedNewtypeDeriving, UndecidableInstances #-} +module T13297 where + +newtype N p m a = N (((CT p) m) a) +deriving instance (CT p ~ f, Functor (f m)) => Functor (N p m) +deriving instance (CT p ~ f, Applicative (f m)) => Applicative (N p m) -- panic when this line added + +class C p where + type CT p :: (* -> *) -> * -> * diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T index e16bd95034..5c3f970ef2 100644 --- a/testsuite/tests/deriving/should_compile/all.T +++ b/testsuite/tests/deriving/should_compile/all.T @@ -84,3 +84,4 @@ test('T12688', normal, compile, ['']) test('T12814', normal, compile, ['-Wredundant-constraints']) test('T13272', normal, compile, ['']) test('T13272a', normal, compile, ['']) +test('T13297', normal, compile, ['']) |