[commit: ghc] master: Make the Ord Module independent of Unique order (2nd try) (348f2db)

git at git.haskell.org git at git.haskell.org
Wed Jun 22 14:25:49 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/348f2dbb835b1208f601bb1e8daa1d1d54507eda/ghc

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

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

    Make the Ord Module independent of Unique order (2nd try)
    
    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].
    
    This fixes #12191 - the regression, that the previous version of this
    patch had.
    
    Test Plan:
    ./validate
    run nofib: P112
    
    Reviewers: simonmar, bgamari, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2354
    
    GHC Trac Issues: #4012, #12191


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

348f2dbb835b1208f601bb1e8daa1d1d54507eda
 compiler/basicTypes/Module.hs                      | 95 +++++++++++++++-------
 compiler/typecheck/FamInst.hs                      | 35 +++++++-
 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 +-
 7 files changed, 119 insertions(+), 55 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 348f2dbb835b1208f601bb1e8daa1d1d54507eda


More information about the ghc-commits mailing list