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>
Mon, 25 Jul 2016 14:38:55 +0000 (07:38 -0700)
commitfbccc0b61184bf93c1135b87c2dc0687ca4a6976
treebee91f4429d6805780a2479fb08d100700556a5c
parent1c59d376b2073f47de936ff49e463e0e1320f779
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

(cherry picked from commit fffe3a25adab41d44943ed1be0191cf570d3e154)
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