[Git][ghc/ghc][wip/sand-witch/lazy-skol] 3 commits: Lazy skolemisation for @a-binders (17594)

Andrei Borzenkov (@sand-witch) gitlab at gitlab.haskell.org
Thu Dec 14 14:00:22 UTC 2023



Andrei Borzenkov pushed to branch wip/sand-witch/lazy-skol at Glasgow Haskell Compiler / GHC


Commits:
be84c48d by Andrei Borzenkov at 2023-12-14T17:53:51+04:00
Lazy skolemisation for @a-binders (17594)

This patch is a preparation for @a-binders implementation.
We have to accept SigmaType in matchExpectedFunTys function
to implement them. To achieve that, I made skolemization more
lazy. This leads to

- Changing tcPolyCheck function. Now it collects skolemised
  type variables and passes a list of them into tc_match_fun,
  so they could be used as [ExpPatType] with @-binsers.
- Changing tcExprSig function, so now it only skolemises signature
  if there is `ScopedTypeVariables` extension enabled.
- Changing tcPolyExpr function. Now it goes deeper into type if type
  actually is
    1) HsPar
    2) HsLam
  In all other cases tcPolyExpr immediately skolemises a type as it was
  previously.

These changes would allow lambdas to accept invisible type arguments
in the most interesting contexts.

- - - - -
d6b004cc by Andrei Borzenkov at 2023-12-14T17:57:29+04:00
fixup! Lazy skolemisation for @a-binders (17594)

- - - - -
1b53bd98 by Andrei Borzenkov at 2023-12-14T18:00:07+04:00
Use flag instead of [ExpPatTy]

- - - - -


30 changed files:

- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Expr.hs-boot
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/Match.hs
- compiler/GHC/Tc/Gen/Match.hs-boot
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Utils/Unify.hs
- compiler/GHC/Types/Var.hs
- libraries/base/tests/T23454.stderr
- testsuite/tests/ado/T16135.stderr
- testsuite/tests/ado/ado005.stderr
- testsuite/tests/arrows/should_fail/T20768_arrow_fail.stderr
- testsuite/tests/arrows/should_fail/T5380.stderr
- testsuite/tests/backpack/should_fail/bkpfail24.stderr
- testsuite/tests/backpack/should_fail/bkpfail44.stderr
- testsuite/tests/dependent/should_fail/T14066d.stderr
- testsuite/tests/dependent/should_fail/T14066e.stderr
- testsuite/tests/gadt/T3169.stderr
- testsuite/tests/gadt/T7558.stderr
- testsuite/tests/gadt/rw.stderr
- testsuite/tests/ghci/scripts/Defer02.stderr
- testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
- testsuite/tests/indexed-types/should_compile/Simple14.stderr
- testsuite/tests/indexed-types/should_compile/T15322a.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/64112a492e1ea6e6282695991df1ad48edd90f8f...1b53bd98d10e731c11446e80bf6dce5f94bde860

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/64112a492e1ea6e6282695991df1ad48edd90f8f...1b53bd98d10e731c11446e80bf6dce5f94bde860
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/20231214/a55ce8f5/attachment.html>


More information about the ghc-commits mailing list