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/tests/polykinds/T14515.hs | |
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/tests/polykinds/T14515.hs')
-rw-r--r-- | testsuite/tests/polykinds/T14515.hs | 13 |
1 files changed, 13 insertions, 0 deletions
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 |