[GHC] #10027: Importing constructor of associated data type fails

GHC ghc-devs at haskell.org
Fri Jan 30 12:48:15 UTC 2015


#10027: Importing constructor of associated data type fails
-------------------------------------+-------------------------------------
        Reporter:  lspitzner         |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.4
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |  constructor import associated data
 Type of failure:  None/Unknown      |  type
      Blocked By:                    |            Architecture:
 Related Tickets:                    |  Unknown/Multiple
                                     |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Replying to [comment:6 lspitzner]:

 > How high would the risk of this breaking existing code be?

 I think it's quite high. I believe it's common practice to define
 datatypes in a package-internal module and then re-export them in a
 package-visible module. (Indeed, I do this in several of my released
 packages!) With the change as proposed, those types would not be re-
 exported, leading to chaos.

 But it seems that you can always import/export data constructors using the
 `pattern` herald in an import/export list. It seems the remaining bit is
 to come up with a syntax to use in case there are ''lots'' of constructors
 and writing out each one is annoying.

 Or have I missed something?

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


More information about the ghc-tickets mailing list