[GHC] #12532: Remove sum and tuple names from knownKeyNames

GHC ghc-devs at haskell.org
Thu Aug 25 12:12:15 UTC 2016


#12532: Remove sum and tuple names from knownKeyNames
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:
            Type:  task              |               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:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 Right, but the problem that I describe is actually quite orthogonal to the
 known-key encoding issue. The problem is that while generating a
 fingerprint for an `IfaceDecl` we override the implementation of `putName`
 in to resolve ensure that the fingerprints the things it refers to are
 included in its fingerprint. We do this by building up a `NameEnv
 Fingerprint` as we walk the `IfaceDecl`s in dependency order. Previously
 this was fine since none of the `Name`s we would serialize were binding
 occurrences.

 However, now that `IfaceTopBndr` is also a `Name` we have lost the ability
 to distinguish binding from non-binding occurrences. This breaks the
 fingerprinting implementation since we then end up attempting to lookup
 the `Name` (and implicit `Name`s) of the thing we are trying to
 fingerprint since its serialization contains a binding `Name`.

 In writing this the solution here became fairly obvious: simply tell
 `putName` whether it is serializing a binding or non-binding occurrence.

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


More information about the ghc-tickets mailing list