Deprecation warnings when exporting whole modules
Given the following modules:
-------------------------------------
module Foo(bar, baz) where
{-# DEPRECATED bar "use baz instead" #-}
bar, baz :: Int
bar = 42
baz = 43
-------------------------------------
module Blah(module Foo) where
import Foo
-------------------------------------
ghc-4.11 complains during compilation of Blah:
./Foo.hi:9: Warning: Variable `bar' is deprecated: use baz instead
This doesn't make sense, because bar is never explicitly mentioned in Blah.
This behaviour is caused by RnNames.exportsFromAvail which simply expands module exports as if every imported entity was explicitly mentioned in the export list. Perhaps AvailInfo should carry a bit more info?
The source location is not very helpful, either, but that's another bug... >:-)
Trac metadata
Trac field |
Value |
Version |
None |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedFixed |
Component |
Compiler |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|