
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by osa1): This is a great idea and it should be just a straightforward refactoring: - Modify `ErrUtils.makeIntoWarning` to get a `Maybe WarningFlag` as argument. - Modify `ErrUtils.ErrMsg` to record a `WarningFlag`. - Since we want to show flags uniformly in messages, maybe modify `LogAction` to pass this `Maybe WarningFlag`. Then modify `DynFlags.defaultLogAction` to print these flags. - Fix all the compile errors by passing warning flags to `makeIntoWarning`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10752#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler