From c0b5a0fe78855d2f628a4b6f973425496315a44c Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 15 Oct 2008 08:43:44 +0000 Subject: [PATCH] Fix Trac #2497; two separate typos in Lexer.x The patch to switch on lexing of 'forall' inside a RULES pragma wasn't working. This fixes it so that it does. --- compiler/parser/Lexer.x | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index fd680bc..19927d1 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -240,7 +240,7 @@ $tab+ { warn Opt_WarnTabs (text "Tab character") } -- with older versions of GHC which generated these. <0,option_prags> { - "{-#" $whitechar* (RULES|rules) { token ITrules_prag } + "{-#" $whitechar* (RULES|rules) { rulePrag } "{-#" $whitechar* (INLINE|inline) { token (ITinline_prag True) } "{-#" $whitechar* (NO(T?)INLINE|no(t?)inline) { token (ITinline_prag False) } @@ -888,7 +888,7 @@ withLexedDocType lexDocComment = do -- off again at the end of the pragma. rulePrag :: Action rulePrag span buf len = do - setExts (.|. inRulePragBit) + setExts (.|. bit inRulePragBit) return (L span ITrules_prag) endPrag :: Action -- 1.7.10.4