#1231: deprecation warnings are reported too often
-------------------------------------------+--------------------------------
Reporter: [EMAIL PROTECTED] | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.6
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: nhc98/src/compiler98 | Architecture: Multiple
Os: Multiple |
-------------------------------------------+--------------------------------
Comment (by simonpj):
This is very easy to change, but I'm not sure it's a good change.
Malcolm's proposal is:
If module `M` mentions a deprecated function `f`, which is defined in
module `F`, a warning is given ONLY IF `M` directly imports `F`.
An example of why you might not want this behaviour is as follows. A
package defines lots of functions in lots of modules, but has a module `X`
"at the top" which gathers all the modules and re-exports all the
functions the package wants to expose. Now clients of the package need
only import `X`. But we still want clients to see deprecation messages
when they use the deprecated function.
Perhaps this modification would do the job?
If module `M` mentions a deprecated function `f`, which is defined in
module `F`, a warning is given ONLY IF either (a) `M` directly imports
`F`, or (b) the import that brought `f` into scope was for a non-home-
package module.
Discuss.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1231>
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