• Richard Eisenberg's avatar
    Fix #13337. · e0c433c8
    Richard Eisenberg authored
    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
RnTypes.hs 73 KB