[commit: ghc] master: Make the Ord Module independent of Unique order (0497ee5)

git at git.haskell.org git at git.haskell.org
Mon Jun 13 18:31:45 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0497ee504cc9ac5d6babee9b98bf779b3fc50b98/ghc

>---------------------------------------------------------------

commit 0497ee504cc9ac5d6babee9b98bf779b3fc50b98
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Thu Jun 9 08:50:32 2016 -0700

    Make the Ord Module independent of Unique order
    
    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


>---------------------------------------------------------------

0497ee504cc9ac5d6babee9b98bf779b3fc50b98
 compiler/basicTypes/Module.hs                      | 84 +++++++++++++++-------
 testsuite/tests/driver/sigof01/all.T               |  2 +-
 .../should_fail/overloadedrecfldsfail10.stderr     |  4 +-
 testsuite/tests/rename/should_fail/T11071.stderr   |  2 +-
 testsuite/tests/rename/should_fail/T11071a.stderr  | 32 ++++-----
 .../tests/typecheck/should_fail/T6018fail.stderr   |  4 +-
 testsuite/tests/typecheck/should_run/T7861.stderr  | 22 +++---
 7 files changed, 92 insertions(+), 58 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 0497ee504cc9ac5d6babee9b98bf779b3fc50b98


More information about the ghc-commits mailing list