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

GHC ghc-devs at haskell.org
Thu May 15 11:59:31 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 goldfire):

 See [https://ghc.haskell.org/trac/ghc/ticket/8950#comment:7 this comment]
 in #8950. I can't quite tell there if `AutoDeriveTypeable` derives for
 promoted data constructors without `DataKinds`.

 Would universally deriving `Typeable` break some abstraction guarantees?
 That is, if a library wanted to hide some types, could they be gotten
 through their (unhideable) `Typeable` instances? Template Haskell can
 surely do this, but I might be willing to ignore that particular attack.
 Are there others? What if a type is known but not the constructors? (I
 don't think `Typeable` can do this.) What about if a type synonym is known
 but the RHS isn't exported? (I bet it can do this.)

 I'm not strongly against this idea, but I just want to understand the
 ramifications of it.

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


More information about the ghc-tickets mailing list