[GHC] #7704: Phantom types break new polykind Typeable with either StandaloneDeriving or AutoDeriveTypeable

GHC cvs-ghc at haskell.org
Thu Feb 21 18:07:11 CET 2013


#7704: Phantom types break new polykind Typeable with either StandaloneDeriving or
AutoDeriveTypeable
-----------------------------+----------------------------------------------
Reporter:  nwf               |          Owner:  dreixel         
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  7.7               |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown      |      Blockedby:                  
Blocking:                    |        Related:                  
-----------------------------+----------------------------------------------

Comment(by monoidal):

 In fact the "deriving (Typeable)" clause does not work either:

 {{{
 {-# LANGUAGE DeriveDataTypeable, PolyKinds #-}

 import Data.Typeable

 newtype Tagged s b = Tagged { unTagged :: b } deriving (Typeable)

 k :: Typeable u => u -> Int
 k _ = 0

 m = k (Tagged 0 :: Tagged Int Int)
 }}}

 (The code compiles without PolyKinds.)

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



More information about the ghc-tickets mailing list