
#9687: Missing Typeable instances for built-in types -------------------------------------+------------------------------------- Reporter: selinger | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by selinger): Simon, what you suggest seems like the logical solution, but doesn't currently work. Test.hs: {{{ import Data.Typeable instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f, Typeable g, Typeable h) => Typeable (a,b,c,d,e,f,g,h) }}} And here's what happens when you compile it: {{{ selinger@firefly-virtual:/tmp$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.3 selinger@firefly-virtual:/tmp$ ghc Test [1 of 1] Compiling Main ( Test.hs, Test.o ) Test.hs:1:1: Typeable instances can only be derived; replace the following instance: instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f, Typeable g, Typeable h) => Typeable (a, b, c, d, e, f, g, h) -- Defined at Test.hs:3:10 selinger@firefly-virtual:/tmp$ }}} By the way, this bug doesn't just apply in the case of built-in types such as 8-tuples. It would also apply to any type that is defined by a library, where the library author neglected to derive a Typeable instance. It seems impossible for user code to provide the requisite instances. -- Peter -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9687#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler