[Git][ghc/ghc][wip/ghc2024] Actually document GHC2024
Joachim Breitner (@nomeata)
gitlab at gitlab.haskell.org
Wed Jan 10 09:25:28 UTC 2024
Joachim Breitner pushed to branch wip/ghc2024 at Glasgow Haskell Compiler / GHC
Commits:
b527af82 by Joachim Breitner at 2024-01-10T10:25:15+01:00
Actually document GHC2024
- - - - -
1 changed file:
- docs/users_guide/exts/control.rst
Changes:
=====================================
docs/users_guide/exts/control.rst
=====================================
@@ -17,25 +17,90 @@ Language extensions can be controlled (i.e. allowed or not) in two ways:
- Language extensions can also be enabled using the ``LANGUAGE`` pragma, thus
``{-# LANGUAGE TemplateHaskell #-}`` (see :ref:`language-pragma`).
-.. extension:: GHC2021
- :shortdesc: Use GHC’s set of default language extensions from 2021
+.. extension:: GHC2024
+ :shortdesc: Use GHC’s set of default language extensions from 2024
GHC blesses a number of extensions, beyond Haskell 2010, to be suitable to
turned on by default. These extensions are considered to be stable and
conservative.
- ``GHC2021`` is used by GHC if neither ``Haskell98`` nor ``Haskell2010`` is
- turned on explicitly. Since later versions of GHC may use a later
- ``GHC20xx`` by default, users are advised to declare the language set
- explicitly with ``-XGHC2021``.
+ ``GHC2024`` is used by GHC if no other language extension (``Haskell98``,
+ ``Haskell2010``, ``GHC2021``) turned on explicitly. Since later versions of
+ GHC may use a later ``GHC20xx`` by default, users are advised to declare
+ the language set explicitly with ``-XGHC2024``.
- Note that, because GHC2021 includes a number of non-standardized
+ Note that, because GHC2024 includes a number of non-standardized
extensions, the stability guarantees it provides are not quite as strong as
those provided by, e.g., :extension:`Haskell2010`. While GHC does take
pains to avoid changing the semantics of these extensions, changes may
still happen (e.g. the simplified subsumption change introduced in GHC 9.0
which caused GHC to reject some programs using :extension:`RankNTypes`).
+ The ``GHC2024`` language set comprises the following extensions:
+
+ .. hlist::
+
+ * :extension:`BangPatterns`
+ * :extension:`BinaryLiterals`
+ * :extension:`ConstrainedClassMethods`
+ * :extension:`ConstraintKinds`
+ * :extension:`DataKinds`
+ * :extension:`DeriveDataTypeable`
+ * :extension:`DeriveFoldable`
+ * :extension:`DeriveFunctor`
+ * :extension:`DeriveGeneric`
+ * :extension:`DeriveLift`
+ * :extension:`DeriveTraversable`
+ * :extension:`DerivingStrategies`
+ * :extension:`DisambiguateRecordFields`
+ * :extension:`DoAndIfThenElse`
+ * :extension:`EmptyCase`
+ * :extension:`EmptyDataDecls`
+ * :extension:`EmptyDataDeriving`
+ * :extension:`ExistentialQuantification`
+ * :extension:`ExplicitForAll`
+ * :extension:`ExplicitNamespaces`
+ * :extension:`FieldSelectors`
+ * :extension:`FlexibleContexts`
+ * :extension:`FlexibleInstances`
+ * :extension:`ForeignFunctionInterface`
+ * :extension:`GADTs`
+ * :extension:`GADTSyntax`
+ * :extension:`GeneralisedNewtypeDeriving`
+ * :extension:`HexFloatLiterals`
+ * :extension:`ImplicitPrelude`
+ * :extension:`ImportQualifiedPost`
+ * :extension:`InstanceSigs`
+ * :extension:`KindSignatures`
+ * :extension:`LambdaCase`
+ * :extension:`MonoLocalBinds`
+ * :extension:`MonomorphismRestriction`
+ * :extension:`MultiParamTypeClasses`
+ * :extension:`NamedFieldPuns`
+ * :extension:`NamedWildCards`
+ * :extension:`NumericUnderscores`
+ * :extension:`PatternGuards`
+ * :extension:`PolyKinds`
+ * :extension:`PostfixOperators`
+ * :extension:`RankNTypes`
+ * :extension:`RelaxedPolyRec`
+ * :extension:`RoleAnnotations`
+ * :extension:`ScopedTypeVariables`
+ * :extension:`StandaloneDeriving`
+ * :extension:`StandaloneKindSignatures`
+ * :extension:`StarIsType`
+ * :extension:`TraditionalRecordSyntax`
+ * :extension:`TupleSections`
+ * :extension:`TypeApplications`
+ * :extension:`TypeOperators`
+ * :extension:`TypeSynonymInstances`
+
+.. extension:: GHC2021
+ :shortdesc: Use GHC’s set of default language extensions from 2021
+
+ See :extension:`GHC2024` for general comments about these language
+ editions.
+
Also note that due to a `minor oversight
<https://github.com/ghc-proposals/ghc-proposals/issues/551>`_, this
extension set behaves slightly differently than enabling each of its
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b527af8231c382c545a0715422d1daaaa85404b3
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b527af8231c382c545a0715422d1daaaa85404b3
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/20240110/b590ecb3/attachment-0001.html>
More information about the ghc-commits
mailing list