Commit c9f0a906 authored by Alec Theriault's avatar Alec Theriault Committed by Alex D

Fix inverted position pragma flag in parser API

The behviour of `lexTokenStream` around position pragma was
accidentally inverted in 469fe613.
This fixes that bug.

This also unbreaks #16239.
parent 87c1bb38
......@@ -2901,7 +2901,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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment