Make inert_model and inert_eqs deterministic sets
authorBartosz Nitka <niteria@gmail.com>
Tue, 17 May 2016 12:45:43 +0000 (05:45 -0700)
committerBartosz Nitka <niteria@gmail.com>
Wed, 18 May 2016 12:44:20 +0000 (05:44 -0700)
commitfffe3a25adab41d44943ed1be0191cf570d3e154
tree7ce7d796d044e78c6030fe517d2837e4debc6d4b
parent77ee3a92a4012530cbd0b63c7b10b544eae50754
Make inert_model and inert_eqs deterministic sets

The order inert_model and intert_eqs fold affects the order that the
typechecker looks at things. I've been able to experimentally confirm
that the order of equalities and the order of the model matter for
determinism. This is just a straigthforward replacement of
nondeterministic VarEnv for deterministic DVarEnv.

Test Plan: ./validate

Reviewers: simonpj, goldfire, austin, bgamari, simonmar

Reviewed By: simonmar

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2232

GHC Trac Issues: #4012
compiler/basicTypes/VarEnv.hs
compiler/typecheck/TcFlatten.hs
compiler/typecheck/TcInteract.hs
compiler/typecheck/TcSMonad.hs
compiler/utils/UniqDFM.hs
testsuite/tests/indexed-types/should_fail/T3330a.stderr
testsuite/tests/indexed-types/should_fail/T4174.stderr
testsuite/tests/indexed-types/should_fail/T4179.stderr
testsuite/tests/indexed-types/should_fail/T9662.stderr
testsuite/tests/polykinds/T9017.stderr
testsuite/tests/typecheck/should_fail/T7869.stderr