[Git][ghc/ghc][wip/sand-witch/modern-STV-extension-shuffling] Extension shuffling (#23291)

Andrei Borzenkov (@sand-witch) gitlab at gitlab.haskell.org
Tue May 16 14:18:46 UTC 2023



Andrei Borzenkov pushed to branch wip/sand-witch/modern-STV-extension-shuffling at Glasgow Haskell Compiler / GHC


Commits:
cb6e2d6c by Ben Gamari at 2023-05-16T18:17:18+04:00
Extension shuffling (#23291)

Where introduced 4 new extensions:
  - PatternSignatures
  - ExtendedForAllScope
  - MethodTypeVariables
  - ImplicitForAll

Tasks of ScopedTypeVariables extension were distributed between
PatternSignatures, ExtendedForAllScope and MethodTypeVariables according
to the proposal. Now ScopedTypeVaribles only implies these three exntesions.

Extension ImplicitForAll saves current behavior. NoImplicitForAll
disables implicit bounding of type variables in many contexts.

Was introduced one new warning option: -Wpattern-signature-binds
It warns when pattern signature binds into scope new type variable. For
example:

  f (a :: t) = ...

- - - - -


30 changed files:

- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Types/Error/Codes.hs
- docs/users_guide/expected-undocumented-flags.txt
- docs/users_guide/exts/explicit_forall.rst
- docs/users_guide/exts/gadt.rst
- + docs/users_guide/exts/implicit_forall.rst
- docs/users_guide/exts/scoped_type_variables.rst
- docs/users_guide/exts/type_abstractions.rst
- docs/users_guide/exts/type_signatures.rst
- docs/users_guide/using-warnings.rst
- libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs
- testsuite/tests/driver/T4437.hs
- + testsuite/tests/rename/should_fail/RnNoImplicitForAll.hs
- + testsuite/tests/rename/should_fail/RnNoImplicitForAll.stderr
- testsuite/tests/rename/should_fail/T11663.stderr
- + testsuite/tests/rename/should_fail/WPatternSigBinds.hs
- + testsuite/tests/rename/should_fail/WPatternSigBinds.stderr
- testsuite/tests/rename/should_fail/all.T
- testsuite/tests/showIface/DocsInHiFile1.stdout


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cb6e2d6c70bf0aa2d0a539bcf4b9c8d679fdba18

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cb6e2d6c70bf0aa2d0a539bcf4b9c8d679fdba18
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/20230516/eb5b23c7/attachment.html>


More information about the ghc-commits mailing list