[Git][ghc/ghc][master] 2 commits: Move defaulting code into a new module

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Oct 22 00:55:41 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00
Move defaulting code into a new module

GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them
are comments.

This MR

* Adds the new module GHC.Tc.Solver.Default, which has all the
  complex, but well modularised, defaulting code

* Moves a bit of code from GHC.Tc.Solver into the existing
  GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM,
  which are called from GHC.Tc.Solver.Default

It's a pure refactor.  No code changes.

- - - - -
a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00
Improve the generalisation code in Solver.simplifyInfer

The code in `decideQuantification` has become quite complicated.
This MR straightens it out, adds a new Note, and on the way
fixes #25266.

See especially Note [decideAndPromoteTyVars] which is is where
all the action happens in this MR.

- - - - -


8 changed files:

- compiler/GHC/Data/Bag.hs
- compiler/GHC/Tc/Deriv/Infer.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/Rule.hs
- compiler/GHC/Tc/Instance/FunDeps.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Solver.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d328d173fa54c35b78b1eef5edba797e1fa03fd4...a398227b1a895b9506ced8c4ee63636a3d173491

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d328d173fa54c35b78b1eef5edba797e1fa03fd4...a398227b1a895b9506ced8c4ee63636a3d173491
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/20241021/e04ec175/attachment.html>


More information about the ghc-commits mailing list