[project @ 2001-10-31 15:22:53 by simonpj]
authorsimonpj <unknown>
Wed, 31 Oct 2001 15:22:55 +0000 (15:22 +0000)
committersimonpj <unknown>
Wed, 31 Oct 2001 15:22:55 +0000 (15:22 +0000)
commit61bfd5dd3b9d70404d6f93c030a9bb1c402b9d31
treedf27d40a816bb0ac039e2ef2610141c625f33cae
parentc01030fe3c628d2be3250e309dd8e933f2011e3a
[project @ 2001-10-31 15:22:53 by simonpj]
------------------------------------------
Improved handling of scoped type variables
------------------------------------------

The main effect of this commit is to allow scoped type variables
in pattern bindings, thus

(x::a, y::b) = e

This was illegal, but now it's ok.  a and b have the same scope
as x and y.

On the way I beefed up the info inside a type variable
(TcType.TyVarDetails; c.f. IdInfo.GlobalIdDetails) which
helps to improve error messages. Hence the wide ranging changes.
Pity about the extra loop from Var to TcType, but can't be helped.
39 files changed:
ghc/compiler/basicTypes/Var.lhs
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/deSugar/DsExpr.lhs
ghc/compiler/deSugar/Match.lhs
ghc/compiler/hsSyn/HsDecls.lhs
ghc/compiler/hsSyn/HsExpr.lhs
ghc/compiler/hsSyn/HsSyn.lhs
ghc/compiler/parser/ParseUtil.lhs
ghc/compiler/parser/Parser.y
ghc/compiler/parser/RdrHsSyn.lhs
ghc/compiler/rename/RnBinds.lhs
ghc/compiler/rename/RnEnv.lhs
ghc/compiler/rename/RnExpr.lhs
ghc/compiler/rename/RnHsSyn.lhs
ghc/compiler/rename/RnSource.lhs
ghc/compiler/simplCore/OccurAnal.lhs
ghc/compiler/simplCore/SimplMonad.lhs
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcBinds.lhs
ghc/compiler/typecheck/TcClassDcl.lhs
ghc/compiler/typecheck/TcEnv.lhs
ghc/compiler/typecheck/TcExpr.hi-boot
ghc/compiler/typecheck/TcExpr.hi-boot-5
ghc/compiler/typecheck/TcExpr.lhs
ghc/compiler/typecheck/TcGRHSs.hi-boot
ghc/compiler/typecheck/TcGenDeriv.lhs
ghc/compiler/typecheck/TcHsSyn.lhs
ghc/compiler/typecheck/TcInstDcls.lhs
ghc/compiler/typecheck/TcMType.lhs
ghc/compiler/typecheck/TcMatches.hi-boot
ghc/compiler/typecheck/TcMatches.hi-boot-5
ghc/compiler/typecheck/TcMatches.lhs
ghc/compiler/typecheck/TcMonad.lhs
ghc/compiler/typecheck/TcMonoType.lhs
ghc/compiler/typecheck/TcPat.lhs
ghc/compiler/typecheck/TcRules.lhs
ghc/compiler/typecheck/TcSimplify.lhs
ghc/compiler/typecheck/TcTyClsDecls.lhs
ghc/compiler/typecheck/TcType.lhs