
Vladislav Zavialov pushed to branch wip/int-index/visible-forall-gadts at Glasgow Haskell Compiler / GHC Commits: 79866e89 by Vladislav Zavialov at 2025-06-10T12:01:53+03:00 Docs update 2 - - - - - 3 changed files: - compiler/Language/Haskell/Syntax/Decls.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/exts/required_type_arguments.rst Changes: ===================================== compiler/Language/Haskell/Syntax/Decls.hs ===================================== @@ -970,9 +970,10 @@ data ConDecl pass -- The following fields describe the type after the '::' -- See Note [GADT abstract syntax] , con_outer_bndrs :: XRec pass (HsOuterSigTyVarBndrs pass) - -- ^ The outermost type variable binders, be they explicit or - -- implicit. The 'XRec' is used to anchor exact print - -- annotations, AnnForall and AnnDot. + -- ^ The outermost type variable binders, be they explicit or implicit; + -- cf. HsSigType that also stores the outermost sig_bndrs separately + -- from the forall telescopes in sig_body. + -- See Note [Representing type signatures] in Language.Haskell.Syntax.Type , con_inner_bndrs :: [HsForAllTelescope pass] -- ^ The forall telescopes other than the outermost invisible forall. , con_mb_cxt :: Maybe (LHsContext pass) -- ^ User-written context (if any) ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -72,6 +72,18 @@ Language * The :extension:`MonadComprehensions` extension now implies :extension:`ParallelListComp` as was originally intended (see `Monad Comprehensions https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/monad_comprehensions...`_). +* In accordance with `GHC Proposal #281 https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0281-vi...`_, + section 4.7 "Data constructors", the :extension:`RequiredTypeArguments` + extension now allows visible forall in types of data constructors + (:ghc-ticket:`25127`). The following declaration is now accepted by GHC: + + :: + + data T a where + Typed :: forall a -> a -> T a + + See :ref:`visible-forall-in-gadts` for details. + Compiler ~~~~~~~~ ===================================== docs/users_guide/exts/required_type_arguments.rst ===================================== @@ -428,6 +428,8 @@ The :extension:`RequiredTypeArguments` extension does not add dependent functions, which would be a much bigger step. Rather :extension:`RequiredTypeArguments` just makes it possible for the type arguments of a function to be compulsory. +.. _visible-forall-in-gadts: + Visible forall in GADTs ~~~~~~~~~~~~~~~~~~~~~~~ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/79866e89b641c9c80892fa9f6c4d2b2b... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/79866e89b641c9c80892fa9f6c4d2b2b... You're receiving this email because of your account on gitlab.haskell.org.