Simon Peyton Jones pushed to branch wip/T26004 at Glasgow Haskell Compiler / GHC
Commits:
-
4a070bbb
by Simon Peyton Jones at 2025-05-01T12:21:50+01:00
1 changed file:
Changes:
... | ... | @@ -1476,9 +1476,8 @@ decideAndPromoteTyVars top_lvl rhs_tclvl infer_mode name_taus psigs wanted |
1476 | 1476 | --------------------------------------------------------------------
|
1477 | 1477 | -- Step 4 of Note [decideAndPromoteTyVars]
|
1478 | 1478 | -- Use closeWrtFunDeps to find any other variables that are determined by mono_tvs
|
1479 | - -- ToDo: can_quant, not (no_quant ++ can_quant); #26004
|
|
1480 | - add_determined tvs = closeWrtFunDeps can_quant tvs
|
|
1481 | - `delVarSetList` psig_qtvs
|
|
1479 | + add_determined tvs preds = closeWrtFunDeps preds tvs
|
|
1480 | + `delVarSetList` psig_qtvs
|
|
1482 | 1481 | -- Why delVarSetList psig_qtvs?
|
1483 | 1482 | -- If the user has explicitly asked for quantification, then that
|
1484 | 1483 | -- request "wins" over the MR.
|
... | ... | @@ -1487,8 +1486,8 @@ decideAndPromoteTyVars top_lvl rhs_tclvl infer_mode name_taus psigs wanted |
1487 | 1486 | -- (i.e. says "no" to isQuantifiableTv)? That's OK: explanation
|
1488 | 1487 | -- in Step 2 of Note [Deciding quantification].
|
1489 | 1488 | |
1490 | - mono_tvs_with_mr_det = add_determined mono_tvs_with_mr
|
|
1491 | - mono_tvs_without_mr_det = add_determined mono_tvs_without_mr
|
|
1489 | + mono_tvs_with_mr_det = add_determined mono_tvs_with_mr post_mr_quant
|
|
1490 | + mono_tvs_without_mr_det = add_determined mono_tvs_without_mr can_quant
|
|
1492 | 1491 | |
1493 | 1492 | --------------------------------------------------------------------
|
1494 | 1493 | -- Step 5 of Note [decideAndPromoteTyVars]
|