Reduce non-determinism in ABI hashes with RULES and instance decls
ClosedPublic

Authored by niteria on Jul 15 2015, 1:11 PM.

Details

Summary

Before this change the RULES would be attached to one for the names from
the module that appear on the left hand side. The choice depended on the
uniq that was generated, which are known to be non-deterministic (a
separate, bigger problem). Now we use OccNames which should be stable.

Analogously for instance declarations, but they are attached to one of
the types involved.

Test Plan

contbuild
it made Data.Text.Internal.Fusion.Common interface stable, previously
stream fusion rule would be attached either to streamList or
unstreamList depending on if the module was compiled after `cabal
clean` or after find | grep '\.o$' | xargs rm.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
niteria updated this revision to Diff 3557.Jul 15 2015, 1:11 PM
niteria retitled this revision from to Reduce non-determinism in ABI hashes with RULES and instance decls.
niteria updated this object.
niteria edited the test plan for this revision. (Show Details)
niteria added reviewers: simonmar, simonpj, austin.
niteria updated the Trac tickets for this revision.
simonmar accepted this revision.Jul 15 2015, 2:36 PM
simonmar edited edge metadata.

Awesome!

compiler/specialise/Rules.hs
187

minimum is probably better (together with a test for empty list). We shouldn't rely on sort being lazy.

This revision is now accepted and ready to land.Jul 15 2015, 2:36 PM
niteria updated this revision to Diff 3560.Jul 15 2015, 4:25 PM
niteria edited edge metadata.

use minimum

simonmar requested changes to this revision.Jul 17 2015, 5:14 AM
simonmar edited edge metadata.

You have a validate failure

This revision now requires changes to proceed.Jul 17 2015, 5:14 AM
niteria updated this revision to Diff 3577.Jul 17 2015, 8:27 AM
niteria edited edge metadata.

remove redundant import

This revision was automatically updated to reflect the committed changes.