[GHC] #9858: Typeable instance for datatype and its promoted constructor is the same

GHC ghc-devs at haskell.org
Fri Jan 16 19:10:27 UTC 2015


#9858: Typeable instance for datatype and its promoted constructor is the same
-------------------------------------+-------------------------------------
        Reporter:  dreixel           |                   Owner:  dreixel
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.9
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by int-e):

 One way of fixing this would be to prepend a prime (or some other non-
 capital letter character) to {{{name_fs}}} in
 {{{TcGenDeriv.gen_Typeable_binds}}} if the given {{{tycon::TyCon}}} is a
 promoted data constructur.

 Is this sufficient or are there other ways in which having distinct type
 constructors with identical {{{tyConName}}} could cause the compiler to go
 wrong?

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


More information about the ghc-tickets mailing list