[GHC] #11120: Missing type representations

GHC ghc-devs at haskell.org
Wed Jan 20 16:07:09 UTC 2016


#11120: Missing type representations
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:
            Type:  bug               |               Status:  patch
        Priority:  high              |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1774
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"84b0ebedd09fcfbda8efd7576dce9f52a2b6e6ca/ghc" 84b0ebe/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="84b0ebedd09fcfbda8efd7576dce9f52a2b6e6ca"
 Rework derivation of type representations for wired-in things

 Previously types defined by `GHC.Types` and `GHC.Prim` had their
 `Typeable` representations manually defined in `GHC.Typeable.Internals`.
 This was terrible, resulting in a great deal of boilerplate and a number
 of bugs due to missing or inconsistent representations (see #11120).

 Here we take a different tack, initially proposed by Richard Eisenberg:
 We wire-in the `Module`, `TrName`, and `TyCon` types, allowing them to
 be used in `GHC.Types`. We then allow the usual type representation
 generation logic to handle this module.

 `GHC.Prim`, on the other hand, is a bit tricky as it has no object code
 of its own.  To handle this we instead place the type representations
 for the types defined here in `GHC.Types`.

 On the whole this eliminates several special-cases as well as a fair
 amount of boilerplate from hand-written representations. Moreover, we
 get full coverage of primitive types for free.

 Test Plan: Validate

 Reviewers: goldfire, simonpj, austin, hvr

 Subscribers: goldfire, simonpj, thomie

 Differential Revision: https://phabricator.haskell.org/D1774

 GHC Trac Issues: #11120
 }}}

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


More information about the ghc-tickets mailing list