[commit: ghc] wip/ghc-8.0-det: Make the Ord Module independent of Unique order (2nd try) (416b3ac)

git at git.haskell.org git at git.haskell.org
Mon Jul 18 17:58:59 UTC 2016


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

On branch  : wip/ghc-8.0-det
Link       : http://ghc.haskell.org/trac/ghc/changeset/416b3aced6fdd6a99363f689a6bdd9234b5140d4/ghc

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

commit 416b3aced6fdd6a99363f689a6bdd9234b5140d4
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


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

416b3aced6fdd6a99363f689a6bdd9234b5140d4
 compiler/basicTypes/Module.hs                      | 99 +++++++++++++++-------
 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, 122 insertions(+), 56 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 416b3aced6fdd6a99363f689a6bdd9234b5140d4


More information about the ghc-commits mailing list