[GHC] #8813: further support deriving instances Typeable1, Typeable2, etc

GHC ghc-devs at haskell.org
Fri Feb 21 08:49:33 UTC 2014


#8813: further support deriving instances Typeable1, Typeable2, etc
----------------------------------------------+----------------------------
        Reporter:  maeder                     |            Owner:
            Type:  task                       |           Status:  closed
        Priority:  normal                     |        Milestone:
       Component:  Compiler                   |          Version:
      Resolution:  wontfix                    |  7.8.1-rc1
Operating System:  Unknown/Multiple           |         Keywords:
 Type of failure:  GHC rejects valid program  |     Architecture:
       Test Case:                             |  Unknown/Multiple
        Blocking:                             |       Difficulty:  Unknown
                                              |       Blocked By:
                                              |  Related Tickets:
----------------------------------------------+----------------------------

Comment (by dreixel):

 Replying to [comment:4 maeder]:
 > What is the problem to add (renamed) copies of Typeable (named
 TypeableN) and add generic instances "TypeableN k => Typeable k" and re-
 export those via Data.Typeable? This would allow to test unmodified
 existing code!!!
 >
 > (These intermediate TypeableN classes may be marked to be deprecated
 later)

 I thought about ways to do this before, and never came to a reasonable
 solution. If you can find one, please let us know.

 For example, instances like `Typeable1 t => Typeable t` are impossible, as
 all `t`s match this instance head. I also didn't see how to reconcile the
 type of the old `typeOF` with the new poly-kinded `typeRep`.

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


More information about the ghc-tickets mailing list