X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FLexer.x;h=4e9617602280fe2cf5dac5fb4b032e3fdf9124b1;hp=460817c1c945306d4f65672c3a7e13bef68b021b;hb=b017f34bebf1588e5e579d7c653413e2a4c2d170;hpb=fb853543030fb0c6ea8750c5ffc025c9d7345a2f diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 460817c..4e96176 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -1816,8 +1816,8 @@ pragState dynflags buf loc = -- create a parse state -- -mkPState :: StringBuffer -> SrcLoc -> DynFlags -> PState -mkPState buf loc flags = +mkPState :: DynFlags -> StringBuffer -> SrcLoc -> PState +mkPState flags buf loc = PState { buffer = buf, dflags = flags, @@ -2201,7 +2201,8 @@ reportLexError loc1 loc2 buf str lexTokenStream :: StringBuffer -> SrcLoc -> DynFlags -> ParseResult [Located Token] lexTokenStream buf loc dflags = unP go initState - where initState = mkPState buf loc (dopt_set (dopt_unset dflags Opt_Haddock) Opt_KeepRawTokenStream) + where dflags' = dopt_set (dopt_unset dflags Opt_Haddock) Opt_KeepRawTokenStream + initState = mkPState dflags' buf loc go = do ltok <- lexer return case ltok of