diff options
author | simonpj <unknown> | 2001-10-31 15:22:55 +0000 |
---|---|---|
committer | simonpj <unknown> | 2001-10-31 15:22:55 +0000 |
commit | 61bfd5dd3b9d70404d6f93c030a9bb1c402b9d31 (patch) | |
tree | df27d40a816bb0ac039e2ef2610141c625f33cae /ghc/compiler/deSugar/Match.lhs | |
parent | c01030fe3c628d2be3250e309dd8e933f2011e3a (diff) | |
download | haskell-61bfd5dd3b9d70404d6f93c030a9bb1c402b9d31.tar.gz |
[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.
Diffstat (limited to 'ghc/compiler/deSugar/Match.lhs')
-rw-r--r-- | ghc/compiler/deSugar/Match.lhs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ghc/compiler/deSugar/Match.lhs b/ghc/compiler/deSugar/Match.lhs index 5113913d47..958c333205 100644 --- a/ghc/compiler/deSugar/Match.lhs +++ b/ghc/compiler/deSugar/Match.lhs @@ -738,7 +738,7 @@ flattenMatches kind matches ASSERT( all (tcEqType result_ty) result_tys ) returnDs (result_ty, eqn_infos) where - flatten_match (Match _ pats _ grhss, n) + flatten_match (Match pats _ grhss, n) = dsGRHSs kind pats grhss `thenDs` \ (ty, match_result) -> getSrcLocDs `thenDs` \ locn -> returnDs (ty, EqnInfo n (DsMatchContext kind pats locn) pats match_result) |