From a33ecb97353d7e411c40edd662a4afcfc603fe28 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 28 Jun 1999 10:01:04 +0000 Subject: [PATCH] [project @ 1999-06-28 10:01:04 by simonmar] Don't treat GHC extension keywords as such when recognising qualified varids. This is a quick fix for the bug that M.label isn't recognised as a qvarid with -fglasgow-exts on. --- ghc/compiler/parser/Lex.lhs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ghc/compiler/parser/Lex.lhs b/ghc/compiler/parser/Lex.lhs index b8f2595..25aa14c 100644 --- a/ghc/compiler/parser/Lex.lhs +++ b/ghc/compiler/parser/Lex.lhs @@ -272,7 +272,6 @@ haskellKeywordsFM = listToUFM $ ( "_scc_", ITscc ) ] - ghcExtensionKeywordsFM = listToUFM $ map (\ (x,y) -> (_PK_ x,y)) [ ( "forall", ITforall ), @@ -1003,12 +1002,9 @@ lex_id3 cont glaexts mod buf just_a_conid in case _scc_ "Lex.haskellKeyword" lookupUFM haskellKeywordsFM lexeme of { Just kwd_token -> just_a_conid; -- avoid M.where etc. - Nothing -> - if flag glaexts - then case lookupUFM ghcExtensionKeywordsFM lexeme of { - Just kwd_token -> just_a_conid; - Nothing -> is_a_qvarid } - else is_a_qvarid + Nothing -> is_a_qvarid + -- TODO: special ids (as, qualified, hiding) shouldn't be + -- recognised as keywords here. ie. M.as is a qualified varid. }}} -- 1.7.10.4