[GHC] #9111: base should export Typeable instances of its promoted data constructors

GHC ghc-devs at haskell.org
Wed May 14 19:37:41 UTC 2014


#9111: base should export Typeable instances of its promoted data constructors
-------------------------------------+------------------------------------
        Reporter:  goldfire          |            Owner:
            Type:  feature request   |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.8.2
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by aavogt):

 This one doesn't work with standalone deriving either:
 {{{
 {-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE StandaloneDeriving #-}

 import Data.Proxy
 import Data.Typeable

 y = typeRep (Proxy :: Proxy "y")

 deriving instance Typeable "y"
 }}}
 The message is
 {{{
     Can't make a derived instance of ‘Typeable "y"’:
       The last argument of the instance must be a data or newtype
 application
     In the stand-alone deriving instance for ‘Typeable "y"’
 }}}

 This issue breaks http://code.haskell.org/HList/examples/cmdargs.hs on
 ghc-7.8.

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


More information about the ghc-tickets mailing list