[GHC] #5937: Kind variables not allowed in data declaration kind annotation
GHC
cvs-ghc at haskell.org
Tue Mar 27 14:45:39 CEST 2012
#5937: Kind variables not allowed in data declaration kind annotation
----------------------------------------+-----------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 7.5
Resolution: fixed | Keywords: PolyKinds
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: GHC rejects valid program | Difficulty: Unknown
Testcase: polykinds/T5937 | Blockedby:
Blocking: | Related:
----------------------------------------+-----------------------------------
Comment(by simonpj@…):
commit 54eb0301cfe5b7ba34e1c6f0664e05961d5b701d
{{{
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Mar 14 17:26:20 2012 +0000
Deal with kind variables brought into scope by a kind signature
This fixes Trac #5937, where a kind variable is mentioned only
in the kind signature of a GADT
data SMaybe :: (k -> *) -> Maybe k -> * where ...
The main change is that the tcdKindSig field of TyData and TyFamily
now has type Maybe (HsBndrSig (LHsKind name)), where the HsBndrSig
part deals with the kind variables that the signature may bind.
I also removed the now-unused PostTcKind field of UserTyVar and
KindedTyVar.
compiler/hsSyn/HsDecls.lhs | 6 +++---
compiler/hsSyn/HsTypes.lhs | 22 ++++------------------
compiler/hsSyn/HsUtils.lhs | 2 +-
compiler/parser/Parser.y.pp | 8 ++++----
compiler/parser/ParserCore.y | 2 +-
compiler/parser/RdrHsSyn.lhs | 11 ++++++-----
compiler/rename/RnTypes.lhs | 21 +++++++++++----------
compiler/typecheck/TcEnv.lhs | 7 +------
compiler/typecheck/TcHsType.lhs | 10 +++++-----
compiler/typecheck/TcTyClsDecls.lhs | 7 ++++---
10 files changed, 40 insertions(+), 56 deletions(-)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5937#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list