[GHC] #14255: Type-indexed type fingerprints

GHC ghc-devs at haskell.org
Wed Sep 20 08:26:12 UTC 2017


#14255: Type-indexed type fingerprints
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Core Libraries    |              Version:  8.2.1
      Resolution:                    |             Keywords:  Typeable
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 dfeuer):

 Replying to [comment:1 simonpj]:
 > I'm 100% lost. What is a fingerprint?  How do you create them?  How does
 it reduce the size of the TCB?

 A fingerprint is just a number (a sort of hash) assigned to a type.
 Fingerprints are used to allow fast comparisons between `TypeRep`s. But
 they're not really attached to the types they represent, and the unsafe
 bits of handling them are woven into the larger/more complex `TypeRep`
 code. I hypothesize that we could compact, if not technically reduce, the
 TCB by using a separate module for a simple newtype

 {{{#!hs
 newtype FingerprintIx a = FingerprintIx Fingerprint
 }}}

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


More information about the ghc-tickets mailing list