[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: Be more careful about quantification

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Mar 22 12:39:33 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
926ad6de by Simon Peyton Jones at 2023-03-22T01:03:08-04:00
Be more careful about quantification

This MR is driven by #23051. It does several things:

* It is guided by the generalisation plan described in #20686.
  But it is still far from a complete implementation of that plan.

* Add Note [Inferred type with escaping kind] to GHC.Tc.Gen.Bind.
  This explains that we don't (yet, pending #20686) directly
  prevent generalising over escaping kinds.

* In `GHC.Tc.Utils.TcMType.defaultTyVar` we default RuntimeRep
  and Multiplicity variables, beause we don't want to quantify over
  them.  We want to do the same for a Concrete tyvar, but there is
  nothing sensible to default it to (unless it has kind RuntimeRep,
  in which case it'll be caught by an earlier case). So we promote
  instead.

* Pure refactoring in GHC.Tc.Solver:
  * Rename decideMonoTyVars to decidePromotedTyVars, since that's
    what it does.

  * Move the actual promotion of the tyvars-to-promote from
    `defaultTyVarsAndSimplify` to `decidePromotedTyVars`.  This is a
    no-op; just tidies up the code.  E.g then we don't need to
    return the promoted tyvars from `decidePromotedTyVars`.

  * A little refactoring in `defaultTyVarsAndSimplify`, but no
    change in behaviour.

* When making a TauTv unification variable into a ConcreteTv
  (in GHC.Tc.Utils.Concrete.makeTypeConcrete), preserve the occ-name
  of the type variable.  This just improves error messages.

* Kill off dead code: GHC.Tc.Utils.TcMType.newConcreteHole

- - - - -
0ab0cc11 by Sylvain Henry at 2023-03-22T01:03:48-04:00
Testsuite: use appropriate predicate for ManyUbxSums test (#22576)

- - - - -
048c881e by romes at 2023-03-22T01:04:24-04:00
fix: Incorrect @since annotations in GHC.TypeError

Fixes #23128

- - - - -
a1528b68 by Sylvain Henry at 2023-03-22T01:05:04-04:00
Testsuite: use req_interp predicate for T16318 (#22370)

- - - - -
ad765b6f by Sylvain Henry at 2023-03-22T01:05:04-04:00
Testsuite: use req_interp predicate for T20214

- - - - -
e0b8eaf3 by Simon Peyton Jones at 2023-03-22T09:50:13+00:00
Refactor the constraint solver pipeline

The big change is to put the entire type-equality solver into
GHC.Tc.Solver.Equality, rather than scattering it over Canonical
and Interact.  Other changes

* EqCt becomes its own data type, a bit like QCInst.  This is
  great because EqualCtList is then just [EqCt]

* New module GHC.Tc.Solver.Dict has come of the class-contraint
  solver.  In due course it will be all.  One step at a time.

This MR is intended to have zero change in behaviour: it is a
pure refactor.  It opens the way to subsequent tidying up, we
believe.

- - - - -
7dde4754 by Sylvain Henry at 2023-03-22T08:39:30-04:00
Testsuite: use js_skip for T2615 (#22374)

- - - - -


5 changed files:

- compiler/GHC/Data/Bag.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Canonical.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b9c7550f7b786de1b9f9dc0281d7d4733ece5f0e...7dde4754542b2c98d1aae3f58678347409221987

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b9c7550f7b786de1b9f9dc0281d7d4733ece5f0e...7dde4754542b2c98d1aae3f58678347409221987
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230322/576afeb5/attachment.html>


More information about the ghc-commits mailing list