[Git][ghc/ghc][wip/int-index/vis-flag-tests] 9 commits: compiler: Cross-reference Note [StgToJS design]

Vladislav Zavialov (@int-index) gitlab at gitlab.haskell.org
Thu Jun 15 09:37:05 UTC 2023



Vladislav Zavialov pushed to branch wip/int-index/vis-flag-tests at Glasgow Haskell Compiler / GHC


Commits:
8f27023b by Ben Gamari at 2023-06-15T03:10:24-04:00
compiler: Cross-reference Note [StgToJS design]

In particular, the numeric representations are quite useful context in a
few places.

- - - - -
a71b60e9 by Andrei Borzenkov at 2023-06-15T03:11:00-04:00
Implement the -Wimplicit-rhs-quantification warning (#23510)

GHC Proposal #425 "Invisible binders in type declarations" forbids
implicit quantification of type variables that occur free on the
right-hand side of a type synonym but are not mentioned on the left-hand side.
The users are expected to rewrite this using invisible binders:

    type T1 :: forall a . Maybe a
    type T1    = 'Nothing :: Maybe a      -- old
    type T1 @a = 'Nothing :: Maybe a      -- new

Since the @k-binders are a new feature, we need to wait for three releases
before we require the use of the new syntax. In the meantime, we ought to
provide users with a new warning, -Wimplicit-rhs-quantification, that would
detect when such implicit quantification takes place, and include it in -Wcompat.

- - - - -
0078dd00 by Sven Tennie at 2023-06-15T03:11:36-04:00
Minor refactorings to mkSpillInstr and mkLoadInstr

Better error messages. And, use the existing `off` constant to reduce
duplication.

- - - - -
1792b57a by doyougnu at 2023-06-15T03:12:17-04:00
JS: merge util modules

Merge Core and StgUtil modules for StgToJS pass.
Closes: #23473

- - - - -
469ff08b by Vladislav Zavialov at 2023-06-15T03:12:57-04:00
Check visibility of nested foralls in can_eq_nc (#18863)

Prior to this change, `can_eq_nc` checked the visibility of the
outermost layer of foralls:

	forall a. forall b. forall c. phi1
	forall x. forall y. forall z. phi2
	        ^^
	     up to here

Then it delegated the rest of the work to `can_eq_nc_forall`, which
split off all foralls:

	forall a. forall b. forall c. phi1
	forall x. forall y. forall z. phi2
	                            ^^
	                         up to here

This meant that some visibility flags were completely ignored.
We fix this oversight by moving the check to `can_eq_nc_forall`.

- - - - -
59c9065b by Luite Stegeman at 2023-06-15T03:13:37-04:00
JS: use regular mask for blocking IO

Blocking IO used uninterruptibleMask which should make any thread
blocked on IO unreachable by async exceptions (such as those from
timeout). This changes it to a regular mask.

It's important to note that the nodejs runtime does not actually
interrupt the blocking IO when the Haskell thread receives an
async exception, and that file positions may be updated and buffers
may be written after the Haskell thread has already resumed.

Any file descriptor affected by an async exception interruption
should therefore be used with caution.

- - - - -
907c06c3 by Luite Stegeman at 2023-06-15T03:13:37-04:00
JS: nodejs: do not set 'readable' handler on stdin at startup

The Haskell runtime used to install a 'readable' handler on stdin
at startup in nodejs. This would cause the nodejs system to start
buffering the stream, causing data loss if the stdin file
descriptor is passed to another process.

This change delays installation of the 'readable' handler until
the first read of stdin by Haskell code.

- - - - -
a54b40a9 by Luite Stegeman at 2023-06-15T03:13:37-04:00
JS: reserve one more virtual (negative) file descriptor

This is needed for upcoming support of the process package

- - - - -
e51ebc8d by Vladislav Zavialov at 2023-06-15T11:36:58+02:00
testsuite: Add forall visibility test cases

The added tests ensure that the type checker does not confuse
visible and invisible foralls.

VisFlag1:    kind-checking type applications and inferred type variable instantiations
VisFlag1_ql: kind-checking Quick Look instantiations
VisFlag2:    kind-checking type family instances
VisFlag3:    checking kind annotations on type parameters of associated type families
VisFlag4:    checking kind annotations on type parameters in type declarations with SAKS
VisFlag5:    checking the result kind annotation of data family instances

- - - - -


30 changed files:

- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/JS/Make.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Arg.hs
- compiler/GHC/StgToJS/Closure.hs
- compiler/GHC/StgToJS/CodeGen.hs
- − compiler/GHC/StgToJS/CoreUtils.hs
- compiler/GHC/StgToJS/DataCon.hs
- compiler/GHC/StgToJS/Expr.hs
- compiler/GHC/StgToJS/FFI.hs
- compiler/GHC/StgToJS/Ids.hs
- compiler/GHC/StgToJS/Prim.hs
- compiler/GHC/StgToJS/Sinker.hs
- − compiler/GHC/StgToJS/StgUtils.hs
- compiler/GHC/StgToJS/Utils.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Solver/Equality.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/ghc.cabal.in
- docs/users_guide/using-warnings.rst
- libraries/base/GHC/IO/FD.hs
- libraries/base/jsbits/base.js
- rts/js/arith.js


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/84d31c6e27480b97f9cf0e57147abdbf5a46f7a6...e51ebc8d63a9c983481b2ddf995b0e8b64e29261

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/84d31c6e27480b97f9cf0e57147abdbf5a46f7a6...e51ebc8d63a9c983481b2ddf995b0e8b64e29261
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/20230615/2470b10d/attachment.html>


More information about the ghc-commits mailing list