From e20d242756f7fb9de33ff5c8229b562fa1bec18b Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 20 Sep 2001 13:32:15 +0000 Subject: [PATCH] [project @ 2001-09-20 13:32:15 by simonmar] Ignore RULES pragmas when -fglasgow-exts is off. --- ghc/compiler/parser/Lex.lhs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ghc/compiler/parser/Lex.lhs b/ghc/compiler/parser/Lex.lhs index 3bdaed4..b4c9bc4 100644 --- a/ghc/compiler/parser/Lex.lhs +++ b/ghc/compiler/parser/Lex.lhs @@ -440,6 +440,9 @@ lexer cont buf s@(PState{ let lexeme = mkFastString -- ToDo: too slow (map toUpper (lexemeToString buf2)) in case lookupUFM pragmaKeywordsFM lexeme of + -- ignore RULES pragmas when -fglasgow-exts is off + Just ITrules_prag | not (flag glaexts) -> + skip_to_end (stepOnBy# buf 2#) s' Just ITline_prag -> line_prag skip_to_end buf2 s' Just other -> is_a_token -- 1.7.10.4