[GHC] #8753: Import constructor but not the data type

GHC ghc-devs at haskell.org
Tue Mar 25 23:57:24 UTC 2014


#8753: Import constructor but not the data type
-------------------------------------+------------------------------------
        Reporter:  andreas.abel      |            Owner:
            Type:  feature request   |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------
Changes (by simonpj):

 * cc: cactus (added)


Comment:

 You are right that there is no good way to do this, and that the lack is
 unfortunate.

 It is, however, possible in GHC 7.8. You can say
 {{{
 import A( pattern D )
 }}}
 provided you use `LANGUAGE PatternSynonyms`.  Here `D` is a data
 constructor, but that's just a degenerate pattern synonym.  Similarly in
 hiding and export lists.

 Does that help?

 I see that this point does not (yet) show up in the user manual, and it
 should. Gergo, might you fix that?


 Simon

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


More information about the ghc-tickets mailing list