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

GHC ghc-devs at haskell.org
Mon Oct 23 14:23:29 UTC 2017


#11251: isInstance does not work on Typeable with base-4.8 anymore
-------------------------------------+-------------------------------------
        Reporter:  songzh            |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  7.10.1
      Resolution:                    |             Keywords:  Typeable,
                                     |  isInstance
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 FWIW, there is already a warning for this sort of thing in the form of
 `-Wderiving-typeable`:

 {{{
 $ ghci Bug.hs -Wderiving-typeable
 GHCi, version 8.2.1: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/rgscott/.ghci
 [1 of 1] Compiling Main             ( Bug.hs, interpreted )

 Bug.hs:6:1: warning: [-Wderiving-typeable]
     • Deriving ‘Typeable’ has no effect: all types now auto-derive
 Typeable
     • In the stand-alone deriving instance for ‘Typeable TT’
   |
 6 | deriving instance Typeable TT
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 Bug.hs:8:1: warning: [-Wderiving-typeable]
     • Deriving ‘Typeable’ has no effect: all types now auto-derive
 Typeable
     • In the stand-alone deriving instance for ‘Typeable TT’
   |
 8 | deriving instance Typeable TT
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 }}}

 Why this isn't enabled in `-Wall` is beyond me.

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


More information about the ghc-tickets mailing list