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

git at git.haskell.org git at git.haskell.org
Mon Jul 25 14:59:32 UTC 2016


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

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

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

commit daa058e080936a7a764ffdf0b70deb85faae9044
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
    
    (cherry picked from commit 348f2dbb835b1208f601bb1e8daa1d1d54507eda)


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

daa058e080936a7a764ffdf0b70deb85faae9044
 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 daa058e080936a7a764ffdf0b70deb85faae9044


More information about the ghc-commits mailing list