[GHC] #9191: Semi-exported names

GHC ghc-devs at haskell.org
Tue Jun 10 19:50:19 UTC 2014


#9191: Semi-exported names
--------------------------------------+------------------------------------
       Reporter:  dfeuer              |             Owner:
           Type:  feature request     |            Status:  new
       Priority:  low                 |         Milestone:
      Component:  Compiler (CodeGen)  |           Version:  7.8.2
       Keywords:                      |  Operating System:
   Architecture:  Unknown/Multiple    |  Unknown/Multiple
     Difficulty:  Unknown             |   Type of failure:  None/Unknown
     Blocked By:                      |         Test Case:
Related Tickets:                      |          Blocking:
--------------------------------------+------------------------------------
 It's generally inadvisable to add exports to a well-known module because
 they may clash with existing code using the module and importing it in its
 entirety. As a work-around, I propose allowing a module to export a name
 that will only be visible in a module that lists it explicitly. Something
 approximately like

 module Foo (a, b, explicit c)

 simply

 import Foo

 would not bring c into scope, but

 import Foo (c)

 would bring in c (and nothing else). To get everything, we could use
 something like

 import Foo revealing (c)

 and to be a bit picky,

 import Foo hiding (a) revealing (c).

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


More information about the ghc-tickets mailing list