[project @ 2001-09-20 13:32:15 by simonmar]
authorsimonmar <unknown>
Thu, 20 Sep 2001 13:32:15 +0000 (13:32 +0000)
committersimonmar <unknown>
Thu, 20 Sep 2001 13:32:15 +0000 (13:32 +0000)
Ignore RULES pragmas when -fglasgow-exts is off.

ghc/compiler/parser/Lex.lhs

index 3bdaed4..b4c9bc4 100644 (file)
@@ -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