[Bug #131931] Deprecation warnings when exporting whole modules

noreply@sourceforge.net noreply@sourceforge.net
Tue, 20 Feb 2001 01:54:49 -0800


Bug #131931, was updated on 2001-Feb-11 13:48
Here is a current snapshot of the bug.

Project: The Glasgow Haskell Compiler
Category: Compiler
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 5
Submitted by: spanne
Assigned to : nobody
Summary: Deprecation warnings when exporting whole modules

Details: 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...
>:-)

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=131931&group_id=8032