Kill varSetElemsWellScoped in quantifyTyVars
authorBartosz Nitka <niteria@gmail.com>
Tue, 26 Apr 2016 12:58:24 +0000 (05:58 -0700)
committerBartosz Nitka <niteria@gmail.com>
Tue, 26 Apr 2016 13:40:04 +0000 (06:40 -0700)
commitc9bcaf3165586ac214fa694e61c55eb45eb131ab
treed01bdfd94886ff368517a6057e2dcf77ce8614cc
parentfd5212fdc26686a85085333af57903a59be809c6
Kill varSetElemsWellScoped in quantifyTyVars

varSetElemsWellScoped introduces unnecessary non-determinism in
inferred type signatures.
Removing this instance required changing the representation of
TcDepVars to use deterministic sets.
This is the last occurence of varSetElemsWellScoped, allowing me to
finally remove it.

Test Plan:
./validate
I will update the expected outputs when commiting, some reordering
of type variables in types is expected.

Reviewers: goldfire, simonpj, austin, bgamari

Reviewed By: simonpj

Subscribers: thomie, simonmar

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

GHC Trac Issues: #4012
59 files changed:
compiler/basicTypes/VarSet.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcMType.hs
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcType.hs
compiler/types/Type.hs
compiler/types/Type.hs-boot
compiler/utils/UniqDFM.hs
compiler/utils/UniqDSet.hs
compiler/utils/UniqFM.hs
testsuite/tests/ado/ado004.stderr
testsuite/tests/dependent/should_fail/T11334b.stderr
testsuite/tests/driver/werror.stderr
testsuite/tests/gadt/gadt13.stderr
testsuite/tests/gadt/gadt7.stderr
testsuite/tests/ghci.debugger/scripts/break026.stdout
testsuite/tests/ghci/scripts/T11524a.stdout
testsuite/tests/ghci/scripts/T6018ghcifail.stderr
testsuite/tests/ghci/scripts/T7587.stdout
testsuite/tests/ghci/scripts/T7730.stdout
testsuite/tests/ghci/scripts/T7939.stdout
testsuite/tests/ghci/scripts/T8776.stdout
testsuite/tests/indexed-types/should_compile/T3017.stderr
testsuite/tests/indexed-types/should_compile/T8889.stderr
testsuite/tests/indexed-types/should_fail/T7354.stderr
testsuite/tests/indexed-types/should_fail/T8518.stderr
testsuite/tests/module/mod71.stderr
testsuite/tests/module/mod72.stderr
testsuite/tests/parser/should_compile/read014.stderr
testsuite/tests/parser/should_fail/readFail003.stderr
testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
testsuite/tests/partial-sigs/should_compile/NamedTyVar.stderr
testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
testsuite/tests/partial-sigs/should_compile/T10438.stderr
testsuite/tests/partial-sigs/should_compile/UncurryNamed.stderr
testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
testsuite/tests/partial-sigs/should_fail/T10045.stderr
testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
testsuite/tests/patsyn/should_compile/T11213.stderr
testsuite/tests/polykinds/T7438.stderr
testsuite/tests/polykinds/T7524.stderr
testsuite/tests/rename/should_fail/T2993.stderr
testsuite/tests/typecheck/should_compile/T10971a.stderr
testsuite/tests/typecheck/should_compile/tc141.stderr
testsuite/tests/typecheck/should_compile/tc168.stderr
testsuite/tests/typecheck/should_compile/tc231.stderr
testsuite/tests/typecheck/should_fail/T5853.stderr
testsuite/tests/typecheck/should_fail/T6018fail.stderr
testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
testsuite/tests/typecheck/should_fail/T7453.stderr
testsuite/tests/typecheck/should_fail/T7734.stderr
testsuite/tests/typecheck/should_fail/T8142.stderr
testsuite/tests/typecheck/should_fail/T9109.stderr
testsuite/tests/typecheck/should_fail/tcfail004.stderr
testsuite/tests/typecheck/should_fail/tcfail033.stderr
testsuite/tests/typecheck/should_fail/tcfail049.stderr
testsuite/tests/typecheck/should_fail/tcfail050.stderr
testsuite/tests/typecheck/should_fail/tcfail140.stderr
testsuite/tests/typecheck/should_fail/tcfail198.stderr