[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: T2T in Expressions (#23738)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Nov 3 18:39:47 UTC 2023



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


Commits:
0dfb1fa7 by Vladislav Zavialov at 2023-11-03T14:08:41-04:00
T2T in Expressions (#23738)

This patch implements the T2T (term-to-type) transformation in
expressions. Given a function with a required type argument
	vfun :: forall a -> ...

the user can now call it as
	vfun (Maybe Int)

instead of
	vfun (type (Maybe Int))

The Maybe Int argument is parsed and renamed as a term (HsExpr), but then
undergoes a conversion to a type (HsType).
See the new function expr_to_type in compiler/GHC/Tc/Gen/App.hs
and Note [RequiredTypeArguments and the T2T mapping]

Left as future work: checking for puns.

- - - - -
7933733a by Duncan Coutts at 2023-11-03T14:39:39-04:00
Add a test for I/O managers

It tries to cover the cases of multiple threads waiting on the same
fd for reading and multiple threads waiting for writing, including
wait cancellation by async exceptions.

It should work for any I/O manager, in-RTS or in-Haskell.
Unfortunately it will not currently work for Windows because it relies
on anonymous unix sockets. It could in principle be ported to use
Windows named pipes.

- - - - -
01e2ac50 by Simon Peyton Jones at 2023-11-03T14:39:39-04:00
Update the unification count in wrapUnifierX

Omitting this caused type inference to fail in #24146.
This was an accidental omision in my refactoring of the
equality solver.

- - - - -


30 changed files:

- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/GHC/Types/Name/Occurrence.hs
- docs/users_guide/exts/required_type_arguments.rst
- testsuite/tests/diagnostic-codes/codes.stdout
- + testsuite/tests/rts/IOManager.hsc
- + testsuite/tests/rts/IOManager.stdout
- testsuite/tests/rts/Makefile
- testsuite/tests/rts/all.T
- + testsuite/tests/typecheck/should_compile/T24146.hs
- testsuite/tests/typecheck/should_compile/all.T
- testsuite/tests/vdq-rta/should_compile/T22326_idv.hs
- + testsuite/tests/vdq-rta/should_compile/T23738_basic.hs
- + testsuite/tests/vdq-rta/should_compile/T23738_nested.hs
- + testsuite/tests/vdq-rta/should_compile/T23738_overlit.hs
- + testsuite/tests/vdq-rta/should_compile/T23738_sigforall.hs
- + testsuite/tests/vdq-rta/should_compile/T23738_th.hs
- + testsuite/tests/vdq-rta/should_compile/T23738_tyvar.hs
- + testsuite/tests/vdq-rta/should_compile/T23738_wild.hs
- testsuite/tests/vdq-rta/should_compile/all.T
- testsuite/tests/vdq-rta/should_fail/T22326_fail_raw_arg.stderr
- + testsuite/tests/vdq-rta/should_fail/T23738_fail_implicit_tv.hs
- + testsuite/tests/vdq-rta/should_fail/T23738_fail_implicit_tv.stderr
- + testsuite/tests/vdq-rta/should_fail/T23738_fail_var.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d1f0555f54fdf9ea18ce221a0369318ab9fbce6c...01e2ac506be836c39d46ff578e606e95c57f5159

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d1f0555f54fdf9ea18ce221a0369318ab9fbce6c...01e2ac506be836c39d46ff578e606e95c57f5159
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/20231103/c6df76a9/attachment.html>


More information about the ghc-commits mailing list