diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-12-15 09:29:12 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-12-15 11:22:11 +0000 |
commit | 68149452a793aedd8d468b689dc93fb2ba5ec436 (patch) | |
tree | fee1cd287c77a415e55a47998db3a482b701317a /testsuite | |
parent | 4a331e659f636e28330142b6df90cb0772a19463 (diff) | |
download | haskell-68149452a793aedd8d468b689dc93fb2ba5ec436.tar.gz |
Fix tcDataKindSig
This patch fixes an outright bug in tcDataKindSig, shown up in Trac
of a data type declaration. See Note [TyConBinders for the result kind
signature of a data type]
I also took the opportunity to elminate the DataKindCheck argument
and data type from tcDataKindSig, instead moving the check to the
call site, which is easier to understand.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/ghci/scripts/T13407.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/polykinds/T14515.hs | 13 | ||||
-rw-r--r-- | testsuite/tests/polykinds/all.T | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/tests/ghci/scripts/T13407.stdout b/testsuite/tests/ghci/scripts/T13407.stdout index 7607413d11..083f3a8b1f 100644 --- a/testsuite/tests/ghci/scripts/T13407.stdout +++ b/testsuite/tests/ghci/scripts/T13407.stdout @@ -1,3 +1,3 @@ type role Foo phantom phantom -data Foo (a :: * -> *) (c :: k) +data Foo (a :: * -> *) (b :: k) -- Defined at <interactive>:3:1 diff --git a/testsuite/tests/polykinds/T14515.hs b/testsuite/tests/polykinds/T14515.hs new file mode 100644 index 0000000000..15bdbfe31d --- /dev/null +++ b/testsuite/tests/polykinds/T14515.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE TypeInType #-} +module Bug where + +import Data.Kind + +type HRank1 ty = forall k1. k1 -> ty +type HRank2 ty = forall k2. k2 -> ty + +data HREFL11 :: HRank1 (HRank1 Type) -- FAILS +data HREFL12 :: HRank1 (HRank2 Type) +data HREFL21 :: HRank2 (HRank1 Type) +data HREFL22 :: HRank2 (HRank2 Type) -- FAILS diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 89ebc2ab33..ba8b256217 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -182,4 +182,5 @@ test('T14555', normal, compile_fail, ['']) test('T14563', normal, compile_fail, ['']) test('T14561', normal, compile_fail, ['']) test('T14580', normal, compile_fail, ['']) +test('T14515', normal, compile, ['']) |