[commit: ghc] master: Use deterministic maps for FamInstEnv (9858552)

Simon Peyton Jones simonpj at microsoft.com
Thu Jul 7 14:53:47 UTC 2016



|  
|  -type FamInstEnv = UniqFM FamilyInstEnv  -- Maps a family to its
|  instances
|  +type FamInstEnv = UniqDFM FamilyInstEnv  -- Maps a family to its
|  +instances
|        -- See Note [FamInstEnv]

Bartosz, could you add your comment from the commit (or variant thereof) 
as a comment to this type definition, so we know WHY you are using 
UniqDFM here?

Thanks

Simon

    We turn FamInstEnvs into lists in some places which
    don't directly affect the ABI. That happens in
    family consistency checks and when producing output
    for `:info`. Unfortunately that nondeterminism
    is nonlocal and it's hard to tell locally what it
    affects. Furthermore the envs should be relatively
    small, so it should be free to use deterministic
    maps here. Testing with nofib and ./validate detected
    no difference between UniqFM and UniqDFM.
    
    GHC Trac: #4012


More information about the ghc-devs mailing list