[GHC] #8813: further support deriving instances Typeable1, Typeable2, etc
GHC
ghc-devs at haskell.org
Fri Feb 21 09:10:54 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 maeder):
The other simple alternative is to patch the renamer and rename the class
Data.Typeable.TypeableN to Data.Typeable.Typeable.
This surely does not reconcile typeOF and typeRep, but hand-written
instances have been (sort of) deprecated long before.
I'm not familiar with the internals of Data.Typeable but the following is
not impossible:
{{{
{-# Language FlexibleInstances, UndecidableInstances #-}
class Pretty a where
pretty :: a -> String
instance Show a => Pretty a where
pretty = show
}}}
Furthermore, Data.!OldTypeable should be removed. It's more harmful to
provide a second incompatible Typeable class.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8813#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list