
#12610: Emit tab warning promptly -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: dalaing Type: bug | Status: new Priority: high | Milestone: 8.0.3 Component: Compiler | Version: 8.0.1 (Parser) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dalaing): It looks like these are the various warnings that can be generated by the parser: If `Opt_WarnTabs` is set: * the tab warnings are collected and summarised If `Opt_WarnUnrecognisedPragmas` is set: * "Unrecognised pragma" If `Opt_WarnAlternativeLayoutRuleTransitional` is set: * "`where' clause at the same depth as implicit layout block" * "`|' at the same depth as implicit layout block" I think it's probably reasonable to print all of the warnings generated during parsing in the event of an unsuccessful parse. The other option would be to print the tab warning and suppress the others. I'm not sure we have enough structure in the warnings at the moment to do anything more fine grained unless we filtered them based on their warning strings. Adding an ADT for the warnings would help with that, and could be a positive step for later, but it's not something we need right now if folks agree that we always want to print all of the warnings on an unsuccessful parse. I'm going to start working on a change that prints warnings on unsuccessful parses (except perhaps for HeaderInfo.getImports, which has a note in it about not logging warning) and see how that goes. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12610#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler