From: simonpj Date: Tue, 11 Mar 2003 09:16:02 +0000 (+0000) Subject: [project @ 2003-03-11 09:16:02 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~1075 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=773da86e8e929e07ea1a3787dc7f8806a01fea38;p=ghc-hetmet.git [project @ 2003-03-11 09:16:02 by simonpj] ---------------------------------- Fix a long-standing egregious parser bug ---------------------------------- *** MERGE TO STABLE *** *** NB: the important part of this commit *** got committed by accident with an *** unrelated message. This commit *** should be from rev 1.50 to 1.52 of RdrHsSyn GHC has parsed data T String = T String without complaint, ever since day 1! This led to consequential incomprehensible messages. The fix is easy. --- diff --git a/ghc/compiler/parser/RdrHsSyn.lhs b/ghc/compiler/parser/RdrHsSyn.lhs index eb9a8a4..cdb59b7 100644 --- a/ghc/compiler/parser/RdrHsSyn.lhs +++ b/ghc/compiler/parser/RdrHsSyn.lhs @@ -519,6 +519,7 @@ checkTyVars :: [RdrNameHsType] -> P [RdrNameHsTyVar] checkTyVars tvs = mapP chk tvs where + -- Check that the name space is correct! chk (HsKindSig (HsTyVar tv) k) | isRdrTyVar tv = returnP (IfaceTyVar tv k) chk (HsTyVar tv) | isRdrTyVar tv = returnP (UserTyVar tv) chk other = parseError "Type found where type variable expected"