Skip to content
  • Ian Lynagh's avatar
    Fix parsing of OPTIONS*/LANGUAGE pragmas in haddock mode · b3e30449
    Ian Lynagh authored
    When getting options from basicTypes/RdrName.lhs, we were seeing
    text like "-- |\n-- ...\n" in the buffer, and lexer then recognises
    "-- |\n-- ..." as a complete ITdocCommentNext token, with the end of
    the buffer not reached.
    
    Next time round, when we get more input into the buffer, it started
    "\n-- * 'Var.Var': see", so the lexer gave us an ITdocSection token.
    
    However, getOptions' only knew about ITdocCommentNext, and so it
    stopped at that point, and didn't see the pragmas further down the file.
    This caused the build to fail due to -fwarn-tabs not being turned off.
    
    But actually, we don't really want the haddock docs at this point, so
    now we just unset Opt_Haddock in getOptionsFromFile.
    b3e30449