Fix #13337.
authorRichard Eisenberg <rae@cs.brynmawr.edu>
Tue, 14 Mar 2017 17:32:00 +0000 (13:32 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 14 Mar 2017 19:10:36 +0000 (15:10 -0400)
commite0c433c81182c934ee4c4cc5c6cf25a1b6fb8d83
tree20514944552768e34cfb1c303c14beaa0c406afe
parent4b673e804fb8598dac02596f107544c7f2ea263b
Fix #13337.

The big change is the introduction of solveSomeEqualities. This
is just like solveEqualities, but it doesn't fail if there are unsolved
equalities when it's all done. Anything unsolved is re-emitted. This
is appropriate if we are not kind-generalizing, so this new form
is used when decideKindGeneralizationPlan says not to.

We initially thought that any use of solveEqualities would be tied
to kind generalization, but this isn't true. For example, we need
to solveEqualities a bunch in the "tc" pass in TcTyClsDecls (which
is really desugaring). These equalities are all surely going to be
soluble (if they weren't the "kc" pass would fail), but we still
need to solve them again. Perhaps if the "kc" pass produced type-
checked output that is then desugared, solveEqualities really would
be tied only to kind generalization.

Updates haddock submodule.

Test Plan: ./validate, typecheck/should_compile/T13337

Reviewers: simonpj, bgamari, austin

Reviewed By: simonpj

Subscribers: RyanGlScott, rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3315
17 files changed:
compiler/hsSyn/Convert.hs
compiler/hsSyn/HsDecls.hs
compiler/hsSyn/HsTypes.hs
compiler/rename/RnSource.hs
compiler/rename/RnTypes.hs
compiler/typecheck/TcBinds.hs
compiler/typecheck/TcForeign.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcTyClsDecls.hs
testsuite/tests/parser/should_compile/DumpParsedAst.stderr
testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
testsuite/tests/partial-sigs/should_fail/T11976.stderr
testsuite/tests/partial-sigs/should_fail/T12634.stderr
testsuite/tests/typecheck/should_compile/T13337.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T
utils/haddock