#3303: Allow multi-line deprecation messages.
------------------------------+---------------------------------------------
 Reporter:  duncan            |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Milestone:                  
Component:  Compiler          |        Version:  6.10.2          
 Severity:  normal            |     Resolution:                  
 Keywords:                    |       Testcase:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
------------------------------+---------------------------------------------
Comment (by duncan):

 On a similar topic, it's annoying not being able to control whether a type
 or identically named constructor is being deprecated. Consider:

 {{{
 data Foo = Foo ...
 }}}

 This is a very common idiom. But now we want to switch to smart
 constructors
 {{{
 foo :: ... -> Foo
 }}}
 and eventually stop exporting the constructor `Foo`. But we cannot specify
 just the constructor, only both. According to the
 [http://haskell.org/ghc/docs/latest/html/users_guide/pragmas.html#warning-
 deprecated-pragma user guide] the workaround would be to have a module
 that imports one but not the other, however while that's possible for the
 type it's not possible for the constructor.

 How about
 {{{
 {-# DEPRECATED constructor Foo "use `foo' instead" #-}
 }}}
 and while we're at it, might as well have
 {{{
 {-# DEPRECATED type Foo "..." #-}
 }}}
 leaving the unqualified case meaning both as it does now.

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