[GHC] #11309: Warn on shady data constructor export

GHC ghc-devs at haskell.org
Wed Dec 30 16:07:56 UTC 2015


#11309: Warn on shady data constructor export
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by mpickering):

 I don't understand the situation where this warning would be useful. If
 you want to export all the constructors then can you not use a wildcard?
 If this warning is implemented and turned on by -Wall then is there any
 way to export some constructors warning free? It seems to me the only
 situation where you explicitly  list the constructors is when you don't
 want to export them all.

 Maybe there is a better example to do with data families which I am
 missing.

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


More information about the ghc-tickets mailing list