Change default lexer mode to Opt_KeepRawTokenStream (#2542)

* Change default lexer mode to Opt_KeepRawTokenStream

* Set lexer to Opt_Haddock in daml-doc tests

* Set Opt_Haddock in another daml-doc test
This commit is contained in:
Shayne Fletcher 2019-08-14 14:13:42 -04:00 committed by Gary Verhaegen
parent 0f0e6740c1
commit afcd1d95df

View File

@ -83,5 +83,10 @@ docHeaders :: [RealLocated AnnotationComment]
docHeaders = mapMaybe (\(L _ x) -> wrk x)
where
wrk = \case
-- When `Opt_Haddock` is enabled.
AnnDocCommentNext s -> Just $ T.pack s
-- When `Opt_KeepRawTokenStream` enabled.
AnnLineComment s -> if "-- |" `isPrefixOf` s
then Just $ T.pack s
else Nothing
_ -> Nothing