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.
parent
9d1a8d87
No related branches found
No related tags found
Pipeline #79533 passed
Stage: tool-lint
Stage: quick-build
Stage: full-build
Stage: packaging
Stage: testing
Showing
- compiler/GHC/Driver/Flags.hs 3 additions, 0 deletionscompiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs 2 additions, 1 deletioncompiler/GHC/Driver/Session.hs
- compiler/GHC/Rename/HsType.hs 7 additions, 5 deletionscompiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs 10 additions, 5 deletionscompiler/GHC/Rename/Module.hs
- compiler/GHC/Tc/Errors/Ppr.hs 9 additions, 0 deletionscompiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs 17 additions, 0 deletionscompiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Types/Error/Codes.hs 1 addition, 0 deletionscompiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Hint.hs 3 additions, 0 deletionscompiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs 2 additions, 0 deletionscompiler/GHC/Types/Hint/Ppr.hs
- docs/users_guide/using-warnings.rst 23 additions, 0 deletionsdocs/users_guide/using-warnings.rst
- testsuite/tests/dependent/should_compile/T16391a.hs 2 additions, 1 deletiontestsuite/tests/dependent/should_compile/T16391a.hs
- testsuite/tests/ghci/scripts/ghci024.stdout 1 addition, 0 deletionstestsuite/tests/ghci/scripts/ghci024.stdout
- testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 1 addition, 0 deletionstestsuite/tests/ghci/scripts/ghci024.stdout-mingw32
- testsuite/tests/rename/should_compile/T23510b.hs 14 additions, 0 deletionstestsuite/tests/rename/should_compile/T23510b.hs
- testsuite/tests/rename/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/rename/should_compile/all.T
- testsuite/tests/rename/should_fail/T23510a.hs 17 additions, 0 deletionstestsuite/tests/rename/should_fail/T23510a.hs
- testsuite/tests/rename/should_fail/T23510a.stderr 30 additions, 0 deletionstestsuite/tests/rename/should_fail/T23510a.stderr
- testsuite/tests/rename/should_fail/all.T 1 addition, 0 deletionstestsuite/tests/rename/should_fail/all.T
- testsuite/tests/typecheck/should_compile/T13343.hs 3 additions, 2 deletionstestsuite/tests/typecheck/should_compile/T13343.hs
Loading
Please register or sign in to comment