[GHC] #11011: Add type-indexed type representations (`TypeRep a`)

GHC ghc-devs at haskell.org
Sun Jan 31 18:46:53 UTC 2016


#11011: Add type-indexed type representations (`TypeRep a`)
-------------------------------------+-------------------------------------
        Reporter:  bjmprice          |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 Actually, I forgot about a small wrinkle. `TyCon` is currently the only
 way one can query for the names of the package and module where a type
 constructor is defined.

 Perhaps we should just stick with the status quo: provide `TyCon` in
 unindexed form as essentially a record of basic metadata about a type
 constructor (perhaps even hiding the fingerprint, so users don't get any
 funny ideas).

 The important thing is that we don't provide a way to create a `TypeRep`
 from a `TyCon`. So long as this is the case the weakly-typed nature of
 `TyCon` should pose no threat.

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


More information about the ghc-tickets mailing list