From 773da86e8e929e07ea1a3787dc7f8806a01fea38 Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 11 Mar 2003 09:16:02 +0000 Subject: [PATCH] [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. --- ghc/compiler/parser/RdrHsSyn.lhs | 1 + 1 file changed, 1 insertion(+) 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" -- 1.7.10.4