[commit: ghc] wip/ghc-8.0-det: Make the Ord Module independent of Unique order (2nd try) (eb59bf7)
git at git.haskell.org
git at git.haskell.org
Thu Jul 14 13:54:28 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ghc-8.0-det
Link : http://ghc.haskell.org/trac/ghc/changeset/eb59bf7143f6133dae2452d1e7d2c302dab1709a/ghc
>---------------------------------------------------------------
commit eb59bf7143f6133dae2452d1e7d2c302dab1709a
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
>---------------------------------------------------------------
eb59bf7143f6133dae2452d1e7d2c302dab1709a
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 eb59bf7143f6133dae2452d1e7d2c302dab1709a
More information about the ghc-commits
mailing list