Skip to content
  • niteria's avatar
    Make the Ord Module independent of Unique order · 0497ee50
    niteria authored
    The `Ord Module` instance currently uses `Unique`s for comparison.
    We don't want to use the `Unique` order because it can introduce nondeterminism.
    This switches `Ord ModuleName` and `Ord UnitId` to use lexicographic ordering
    making `Ord Module` deterministic transitively.
    
    I've run `nofib` and it doesn't make a measurable difference.
    
    See also Note [ModuleEnv determinism and performance].
    
    Test Plan:
    ./validate
    run nofib: P112
    
    Reviewers: simonpj, simonmar, austin, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2030
    
    GHC Trac Issues: #4012
    0497ee50