#2119: explicitly importing deprecated symbols should elicit the deprecation
warning
--------------------------------+-------------------------------------------
Reporter: duncan | Owner:
Type: feature request | Status: new
Priority: normal | Component: Compiler
Version: 6.8.2 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
--------------------------------+-------------------------------------------
If we explicitly import but do not use a deprecated function then ghc does
not give the deprecation warning.
{{{
module Foo where
{-# DEPRECATED foo "don't use foo please, use ..." #-}
foo = ...
}}}
{{{
module Bar where
import Foo (foo)
}}}
This is a bit annoying since it means client packages do not get any
notification that some function is going to disappear but they would break
if it does disappear. Or to look at it another way, it prevents me
removing old deprecated functions because I don't want to break client
programs but I have no way of communicating that to the author of a
program that is importing but is no longer using the deprecated function.
My real world example is the Cabal lib and lhs2tex's Setup.hs file. It is
importing `Distribution.Simple.LocalBuildInfo.mkDataDir` (which is
deprecated in the current released Cabal version) but the Setup.hs is not
actually using it, so the author got no indication that it should not be
imported anymore. In the development version of Cabal I'd already removed
this deprecated function since I assumed we'd given everyone plenty of
warning. I'll have to go add `mkDataDir` back.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2119>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs