[GHC] #9764: Home package modules silently override available modules from package database

GHC ghc-devs at haskell.org
Tue Nov 4 19:52:06 UTC 2014


#9764: Home package modules silently override available modules from package
database
-------------------------------------+-------------------------------------
              Reporter:  ezyang      |            Owner:  ezyang
                  Type:  feature     |           Status:  new
  request                            |        Milestone:
              Priority:  normal      |          Version:  7.9
             Component:  Compiler    |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:  GHC         |  Related Tickets:
  accepts invalid program            |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by Yuras):

 If I understand it correctly, it will break my `-Wall`'d code. I sometimes
 have local Prelude module to work around some incompatibilities between
 versions:

 {{{ #!haskell
 {-# LANGUAGE PackageImports #-}
 {-# LANGUAGE CPP #-}
 module Prelude
 (
 module P
 )
 where
 #if MIN_VERSION_base(4,6,0)
 import "base" Prelude as P
 #else
 import "base" Prelude as P hiding (catch)
 #endif
 }}}

 There are other ways to do that, so I'm not advocating against the
 proposal. But that is a legitimate use case IMO, and it can be used not
 only for Prelude. So at least a switch to turn off the warning should be
 provided, please.

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


More information about the ghc-tickets mailing list