[GHC] #8363: Order matters for unused import warnings when reexporting identifiers

GHC ghc-devs at haskell.org
Wed Jul 1 18:28:46 UTC 2015


#8363: Order matters for unused import warnings when reexporting identifiers
-------------------------------------+-------------------------------------
        Reporter:  bergmark          |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.7
      Resolution:                    |                Keywords:  newcomer
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Be aware though that it has become somewhat popular to exploit this bug(?)
 to avoid writing CPP to manage the changes in Prelude's exports in 7.10.

 {{{
 module Main where

 import Control.Applicative -- needed in 7.8, and not a warning in 7.10
                            -- because it comes before the Prelude import,
                            -- though it actually is redundant in 7.10
 import Prelude             -- has the effect of canceling the implicit
                            -- import of Prelude

 ...
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8363#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list