[GHC] #11251: isInstance does not work on Typeable with base-4.8 anymore

GHC ghc-devs at haskell.org
Fri Dec 18 11:01:00 UTC 2015


#11251: isInstance does not work on Typeable with base-4.8 anymore
-------------------------------------+-------------------------------------
           Reporter:  songzh         |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:                 |           Version:  7.10.1
  libraries/base                     |
           Keywords:  Typeable,      |  Operating System:  Unknown/Multiple
  isInstance                         |
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{#!hs
 > :set -XTemplateHaskell
 > :m +Data.Tyepable
 > :m +Language.Haskell.TH

 --- With GHC 7.8 or earlier versions of GHC (I only tried with GHC 7.6,
 but my friends tried on 7.8 and earlier versoin)
 > $(isInstance ''Typeable [ConT ''Char] >>= stringE.show)
 "True"

 --- With GHC 7.10.1
 > $(isInstance ''Typeable [ConT ''Char] >>= stringE.show)
 "False"
 }}}

 I have noticed that standalone derivings of Typeable instances in
 Data.Typeable are disappared magically in base-4.8 of GHC 7.10,also one
 cannot query the instances of it by using `:i Typeable` in GHCi, however,
 obviously, I can use `typeOf` function in base-4.8 to get the TypeRep of
 Char.

 The problem is that `isInstance` in template-haskell library doesn't know
 Char and many other types are instances of Typeable anymore.

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


More information about the ghc-tickets mailing list