#3665: Add whole-package deprecation warnings
-----------------------------+----------------------------------------------
Reporter:  duncan            |          Owner:                  
    Type:  feature request   |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  6.12.1 RC1        |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 With GHC-6.12 if you use base 3 you get:

 {{{
     Warning: Module `Prelude' is deprecated:
                  [You are using an old version of base. Future
 GHC versions will not support this version, so you need to
 update your code to use the new base version.]
 }}}

 This is initially a somewhat confusing warning. We're not really
 deprecating the Prelude!

 It would be much nicer if it told us:

 {{{
     Warning: Package `base-3.0.3.2' is deprecated:
                  [You are using an old version of base. Future
 GHC versions will not support this version, so you need to
 update your code to use the new base version.]
 }}}

 The message itself could be formatted more nicely too. Patch attached for
 that.

 Note the current spurious list syntax in the deprecation message. I've re-
 opened #3303 about that.

 As for the syntax for package deprecations, how about just
 {{{
 module Foo {-# DEPRECATED package "the message" #-} (..) where
 }}}

 For the behaviour, how about making them behave just like module-
 deprecation messages in that one attaches them to a module header and they
 are only triggered if you import that module. The only change would be in
 how the message is reported; instead of saying the module is deprecated
 it'd give the package (including the full version).

 I know this is a feature request, which usually we'd want to put off for
 the next major version, but since this one is all about helping
 maintainers and users of 6.12.1 and .2, I hope that we consider looking at
 it for an early 6.12 release.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3665>
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

Reply via email to