summaryrefslogtreecommitdiff
path: root/compiler/parser
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2019-01-28 22:11:08 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-02-10 02:39:06 -0500
commit3fcf79a47138661bb01276a94e3b6d934ba92d4d (patch)
treed2c771adc0257cedde422f4e7efe6c18f15f5bd9 /compiler/parser
parent249b0babb08409311a56da0ef890445676927fb7 (diff)
downloadhaskell-3fcf79a47138661bb01276a94e3b6d934ba92d4d.tar.gz
Fix inverted position pragma flag in parser API
The behviour of `lexTokenStream` around position pragma was accidentally inverted in 469fe6133646df5568c9486de2202124cb734242. This fixes that bug. This also unbreaks #16239.
Diffstat (limited to 'compiler/parser')
-rw-r--r--compiler/parser/Lexer.x2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
index 8219390e7e..1e27158b80 100644
--- a/compiler/parser/Lexer.x
+++ b/compiler/parser/Lexer.x
@@ -2900,7 +2900,7 @@ lexTokenStream :: StringBuffer -> RealSrcLoc -> DynFlags -> ParseResult [Located
lexTokenStream buf loc dflags = unP go initState{ options = opts' }
where dflags' = gopt_set (gopt_unset dflags Opt_Haddock) Opt_KeepRawTokenStream
initState@PState{ options = opts } = mkPState dflags' buf loc
- opts' = opts{ pExtsBitmap = xbit UsePosPragsBit .|. pExtsBitmap opts }
+ opts' = opts{ pExtsBitmap = complement (xbit UsePosPragsBit) .&. pExtsBitmap opts }
go = do
ltok <- lexer False return
case ltok of