• Richard Eisenberg's avatar
    Solve constraints from top-level groups sooner · 9612e91c
    Richard Eisenberg authored
    Previously, all constraints from all top-level groups (as
    separated by top-level splices) were lumped together and solved
    at the end. This could leak metavariables to TH, though, and
    that's bad. This patch solves each group's constraints before
    running the next group's splice.
    Naturally, we now report fewer errors in some cases.
    One nice benefit is that this also fixes #11680, but in a much
    simpler way than the original fix for that ticket. Admittedly,
    the error messages degrade just a bit from the fix from #11680
    (previously, we informed users about variables that will be
    brought into scope below a top-level splice, and now we just
    report an out-of-scope error), but the amount of complexity
    required throughout GHC to get that error was just not worth it.
    This patch thus reverts much of
    Fixes #16980
    Test cases: th/T16980{,a}
Last commit
Last update
ApiAnnotation.hs Loading commit data...
Ctype.hs Loading commit data...
HaddockUtils.hs Loading commit data...
Lexer.x Loading commit data...
Parser.y Loading commit data...
RdrHsSyn.hs Loading commit data...
cutils.c Loading commit data...
cutils.h Loading commit data...