patch applied (ghc): Keep track of explicit kinding in
HsTyVarBndr; plus fix Trac #3845
Simon Peyton Jones
simonpj at microsoft.com
Wed Feb 10 09:52:59 EST 2010
Wed Feb 10 06:51:55 PST 2010 simonpj at microsoft.com
* Keep track of explicit kinding in HsTyVarBndr; plus fix Trac #3845
To print HsTypes correctly we should remember whether the Kind on
a HsTyVarBndr came from type inference, or was put there by the
user. See Note [Printing KindedTyVars] in HsTypes. So instead of
changing a UserTyVar to a KindedTyVar during kind checking, we
simply add a PostTcKind to the UserTyVar.
The change was provoked by Trac #3830, although other changes
mean that #3830 gets a diferent and better error message now.
So this patch is simply doing the Right Thing for the future.
This patch also fixes Trac #3845, which was caused by a *type splice*
not remembering the free *term variables* mentioned in it. Result
was that we build a 'let' when it should have been 'letrec'.
Hence a new FreeVars field in HsSpliceTy.
While I was at it, I got rid of HsSpliceTyOut and use a PostTcKind
on HsSpliceTy instead, just like on the UserTyVar.
M ./compiler/deSugar/DsMeta.hs -6 +7
M ./compiler/hsSyn/Convert.lhs -1 +1
M ./compiler/hsSyn/HsDecls.lhs -1 +1
M ./compiler/hsSyn/HsTypes.lhs -31 +53
M ./compiler/hsSyn/HsUtils.lhs -1 +5
M ./compiler/parser/Parser.y.pp -8 +6
M ./compiler/parser/RdrHsSyn.lhs -4 +2
M ./compiler/rename/RnHsSyn.lhs -3 +2
M ./compiler/rename/RnTypes.lhs -5 +4
M ./compiler/typecheck/TcClassDcl.lhs -1 +2
M ./compiler/typecheck/TcEnv.lhs -6 +3
M ./compiler/typecheck/TcGenDeriv.lhs -1 +2
M ./compiler/typecheck/TcHsType.lhs -45 +14
M ./compiler/typecheck/TcSplice.lhs -7 +5
M ./compiler/typecheck/TcSplice.lhs-boot -1 +2
M ./compiler/typecheck/TcTyClsDecls.lhs -16 +16
View patch online:
More information about the Cvs-ghc