[GHC] #12415: Fancy BinIface encoding for tuples is broken for constraint tuples

GHC ghc-devs at haskell.org
Thu Jul 21 16:10:33 UTC 2016


#12415: Fancy BinIface encoding for tuples is broken for constraint tuples
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #12357            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 One of the roadblocks standing in the way of reinstating this encoding is
 that the constraint tuple's `Name`s are actually quite different from the
 other tuples (and even boxed/unboxed sums). There are five `Name`s
 associated with a type (or class) that we need to worry about in these
 cases,

 a. the `Name` of the `TyCon`
 b. the `Name` of its `DataCon`
 c. the `Name` of its `DataCon` worker
 d. the `Name` of its type representation
 e. the `Name` of its promoted data constructor type representation

 In the case of boxed and unboxed tuples a, b, and c are wired-in and d and
 e are known-key.
 In the case of constraint tuples, however, a is known-key and the rest are
 unknown to the compiler, requiring a lookup in the `GHC.Classes` interface
 file.

 This means that it is quite difficult to spot most of the `Name`s that for
 boxed and unboxed tuples we encode specially.

 Simon, do you think this is worth fixing?

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


More information about the ghc-tickets mailing list