[GHC] #5540: Non-deterministic pure code in Data.Typeable

GHC cvs-ghc at haskell.org
Mon Oct 10 10:08:37 CEST 2011


#5540: Non-deterministic pure code in Data.Typeable
-------------------------------+--------------------------------------------
    Reporter:  guest           |        Owner:              
        Type:  bug             |       Status:  new         
    Priority:  normal          |    Milestone:              
   Component:  libraries/base  |      Version:  7.0.3       
    Keywords:                  |     Testcase:              
   Blockedby:                  |   Difficulty:              
          Os:  MacOS X         |     Blocking:              
Architecture:  x86_64 (amd64)  |      Failure:  None/Unknown
-------------------------------+--------------------------------------------

Comment(by simonpj):

 Thank you for the detailed investigation.  I have not followed all the
 details of this thread, but I think that it may (happily) represent a bug
 in generating `TypeReps` that is already fixed.

  * We used to have a global cache from which we generated unique Int keys
 corresponding to type constructors.  The trouble with this was that (a)
 you weren’t guaranteed to get the same key in every run, and (b) the cache
 was not initially designed to be thread-safe, and I’m not sure that we’d
 closed all race conditions.

  * But NOW we generate a MD5 hash, or fingerprint, of the type.  So there
 is no global cache, no race condition, and you should get the same
 behaviour ever time.

 In short, can you try with 7.2?

 Thanks

 Simon

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



More information about the Glasgow-haskell-bugs mailing list