Include use site of deprecated identifiers in deprecation warnings
Currently a deprecation warning reports the line of the import statement that brings the deprecated identifier into scope. I think it would be useful to print the line where the identifier is used, instead.
Steps to reproduce:
module Foo where
import Bar
foo = bar
module Bar where
bar = 23
{-# DEPRECATED bar "use baz instead" #-}
Expected result:
Foo.hs:3:1:
Warning: In the use of `bar'
(imported from Bar):
Deprecated: "use baz instead"
Actual result:
Foo.hs:2:1:
Warning: In the use of `bar'
(imported from Bar):
Deprecated: "use baz instead"
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.1 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |