Skip to content
Snippets Groups Projects
Commit 6e18ce2b authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

users-guide: Clarify language extension documentation

Over the years the users guide's language extension documentation has
gone through quite a few refactorings. In the process some of the
descriptions have been rendered non-sensical. For instance, the
description of `NoImplicitPrelude` actually describes the semantics of
`ImplicitPrelude`.

To fix this we:

 * ensure that all extensions are named in their "positive" sense (e.g.
   `ImplicitPrelude` rather than `NoImplicitPrelude`).
 * rework the documentation to avoid flag-oriented wording
   like "enable" and "disable"
 * ensure that the polarity of the documentation is consistent with
   reality.

Fixes #23895.
parent 1b1a92bd
No related branches found
No related tags found
No related merge requests found
Showing
with 28 additions and 41 deletions
...@@ -9,17 +9,13 @@ ...@@ -9,17 +9,13 @@
-XAutoDeriveTypeable -XAutoDeriveTypeable
-XDoAndIfThenElse -XDoAndIfThenElse
-XDoRec -XDoRec
-XImplicitPrelude
-XJavaScriptFFI -XJavaScriptFFI
-XMonomorphismRestriction
-XParallelArrays -XParallelArrays
-XPatternGuards
-XPatternSignatures -XPatternSignatures
-XPolymorphicComponents -XPolymorphicComponents
-XRecordPuns -XRecordPuns
-XRelaxedLayout -XRelaxedLayout
-XRelaxedPolyRec -XRelaxedPolyRec
-XTraditionalRecordSyntax
-copy-libs-when-linking -copy-libs-when-linking
-dannot-lint -dannot-lint
-dppr-ticks -dppr-ticks
......
...@@ -8,7 +8,7 @@ Applicative do-notation ...@@ -8,7 +8,7 @@ Applicative do-notation
single: do-notation; Applicative single: do-notation; Applicative
.. extension:: ApplicativeDo .. extension:: ApplicativeDo
:shortdesc: Enable Applicative do-notation desugaring :shortdesc: Allow do-notation statements to be desugared via ``Applicative``.
:since: 8.0.1 :since: 8.0.1
......
...@@ -4,7 +4,7 @@ Arrow notation ...@@ -4,7 +4,7 @@ Arrow notation
============== ==============
.. extension:: Arrows .. extension:: Arrows
:shortdesc: Enable arrow notation extension :shortdesc: Allow arrow notation (e.g. ``proc``)
:since: 6.8.1 :since: 6.8.1
......
...@@ -4,7 +4,7 @@ Binary integer literals ...@@ -4,7 +4,7 @@ Binary integer literals
----------------------- -----------------------
.. extension:: BinaryLiterals .. extension:: BinaryLiterals
:shortdesc: Enable support for binary literals. :shortdesc: Allow binary literal syntax.
:since: 7.10.1 :since: 7.10.1
......
...@@ -4,8 +4,7 @@ Constrained class method types ...@@ -4,8 +4,7 @@ Constrained class method types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. extension:: ConstrainedClassMethods .. extension:: ConstrainedClassMethods
:shortdesc: Enable constrained class methods. :shortdesc: Allow class methods to have non-empty contexts.
Implied by :extension:`MultiParamTypeClasses`.
:since: 6.8.1 :since: 6.8.1
......
...@@ -4,7 +4,7 @@ The ``Constraint`` kind ...@@ -4,7 +4,7 @@ The ``Constraint`` kind
----------------------- -----------------------
.. extension:: ConstraintKinds .. extension:: ConstraintKinds
:shortdesc: Enable a kind of constraints. :shortdesc: Allow constraints to be used as types of kind ``Constraint``.
:since: 7.4.1 :since: 7.4.1
......
...@@ -4,7 +4,7 @@ Datatype promotion ...@@ -4,7 +4,7 @@ Datatype promotion
================== ==================
.. extension:: DataKinds .. extension:: DataKinds
:shortdesc: Enable datatype promotion. :shortdesc: Allow use of data constructors in types.
:since: 7.4.1 :since: 7.4.1
......
...@@ -4,7 +4,7 @@ Default method signatures ...@@ -4,7 +4,7 @@ Default method signatures
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
.. extension:: DefaultSignatures .. extension:: DefaultSignatures
:shortdesc: Enable default signatures. :shortdesc: Allow default signatures for typeclass methods.
:since: 7.2.1 :since: 7.2.1
......
...@@ -4,7 +4,7 @@ Deriving any other class ...@@ -4,7 +4,7 @@ Deriving any other class
------------------------ ------------------------
.. extension:: DeriveAnyClass .. extension:: DeriveAnyClass
:shortdesc: Enable deriving for any class. :shortdesc: Allow ``deriving`` syntax to be used for any class.
:since: 7.10.1 :since: 7.10.1
......
...@@ -50,8 +50,7 @@ Deriving ``Functor`` instances ...@@ -50,8 +50,7 @@ Deriving ``Functor`` instances
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. extension:: DeriveFunctor .. extension:: DeriveFunctor
:shortdesc: Enable deriving for the Functor class. :shortdesc: Allow deriving for the ``Functor`` class.
Implied by :extension:`DeriveTraversable`.
:implied by: :extension:`DeriveTraversable` :implied by: :extension:`DeriveTraversable`
:since: 7.10.1 :since: 7.10.1
...@@ -246,8 +245,7 @@ Deriving ``Foldable`` instances ...@@ -246,8 +245,7 @@ Deriving ``Foldable`` instances
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. extension:: DeriveFoldable .. extension:: DeriveFoldable
:shortdesc: Enable deriving for the Foldable class. :shortdesc: Allow deriving for the ``Foldable`` class.
Implied by :extension:`DeriveTraversable`.
:implied by: :extension:`DeriveTraversable` :implied by: :extension:`DeriveTraversable`
:since: 7.10.1 :since: 7.10.1
...@@ -389,8 +387,7 @@ Deriving ``Traversable`` instances ...@@ -389,8 +387,7 @@ Deriving ``Traversable`` instances
.. extension:: DeriveTraversable .. extension:: DeriveTraversable
:shortdesc: Enable deriving for the Traversable class. :shortdesc: Allow deriving for the ``Traversable`` class.
Implies :extension:`DeriveFunctor` and :extension:`DeriveFoldable`.
:implies: :extension:`DeriveFoldable`, :extension:`DeriveFunctor` :implies: :extension:`DeriveFoldable`, :extension:`DeriveFunctor`
:implied by: :extension:`GHC2021` :implied by: :extension:`GHC2021`
...@@ -469,7 +466,7 @@ Deriving ``Data`` instances ...@@ -469,7 +466,7 @@ Deriving ``Data`` instances
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. extension:: DeriveDataTypeable .. extension:: DeriveDataTypeable
:shortdesc: Enable deriving for the ``Data`` class. :shortdesc: Allow deriving for the ``Data`` class.
:since: 6.8.1 :since: 6.8.1
:status: Included in :extension:`GHC2024`, :extension:`GHC2021` :status: Included in :extension:`GHC2024`, :extension:`GHC2021`
...@@ -523,7 +520,7 @@ Deriving ``Lift`` instances ...@@ -523,7 +520,7 @@ Deriving ``Lift`` instances
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. extension:: DeriveLift .. extension:: DeriveLift
:shortdesc: Enable deriving for the Lift class :shortdesc: Allow deriving for the ``Lift`` class
:since: 8.0.1 :since: 8.0.1
:status: Included in :extension:`GHC2024`, :extension:`GHC2021` :status: Included in :extension:`GHC2024`, :extension:`GHC2021`
......
...@@ -4,7 +4,7 @@ Deriving strategies ...@@ -4,7 +4,7 @@ Deriving strategies
------------------- -------------------
.. extension:: DerivingStrategies .. extension:: DerivingStrategies
:shortdesc: Enables deriving strategies. :shortdesc: Allow use of instance deriving strategies.
:since: 8.2.1 :since: 8.2.1
......
...@@ -4,9 +4,8 @@ Deriving via ...@@ -4,9 +4,8 @@ Deriving via
------------ ------------
.. extension:: DerivingVia .. extension:: DerivingVia
:shortdesc: Enable deriving instances ``via`` types of the same runtime :shortdesc: Allow deriving instances ``via`` types of the same runtime
representation. representation.
Implies :extension:`DerivingStrategies`.
:implies: :extension:`DerivingStrategies` :implies: :extension:`DerivingStrategies`
......
...@@ -4,8 +4,7 @@ Record field disambiguation ...@@ -4,8 +4,7 @@ Record field disambiguation
--------------------------- ---------------------------
.. extension:: DisambiguateRecordFields .. extension:: DisambiguateRecordFields
:shortdesc: Enable record field disambiguation. :shortdesc: Automatically disambiguate some record field references.
Implied by :extension:`RecordWildCards`.
:since: 6.8.1 :since: 6.8.1
:implied by: :extension:`RecordWildCards`, :extension:`DuplicateRecordFields` :implied by: :extension:`RecordWildCards`, :extension:`DuplicateRecordFields`
......
...@@ -4,7 +4,7 @@ Empty case alternatives ...@@ -4,7 +4,7 @@ Empty case alternatives
----------------------- -----------------------
.. extension:: EmptyCase .. extension:: EmptyCase
:shortdesc: Allow empty case alternatives. :shortdesc: Allow ``case`` expressions with no alternatives.
:since: 7.8.1 :since: 7.8.1
:status: Included in :extension:`GHC2024`, :extension:`GHC2021` :status: Included in :extension:`GHC2024`, :extension:`GHC2021`
......
...@@ -4,7 +4,7 @@ Existentially quantified data constructors ...@@ -4,7 +4,7 @@ Existentially quantified data constructors
------------------------------------------ ------------------------------------------
.. extension:: ExistentialQuantification .. extension:: ExistentialQuantification
:shortdesc: Enable liberalised type synonyms. :shortdesc: Allow existentially quantified type variables in types.
:implies: :extension:`ExplicitForAll` :implies: :extension:`ExplicitForAll`
:since: 6.8.1 :since: 6.8.1
......
...@@ -4,9 +4,7 @@ Explicit universal quantification (forall) ...@@ -4,9 +4,7 @@ Explicit universal quantification (forall)
------------------------------------------ ------------------------------------------
.. extension:: ExplicitForAll .. extension:: ExplicitForAll
:shortdesc: Enable explicit universal quantification. :shortdesc: Allow explicit universal quantification.
Implied by :extension:`ScopedTypeVariables`, :extension:`LiberalTypeSynonyms`,
:extension:`RankNTypes` and :extension:`ExistentialQuantification`.
:implied by: :extension:`ScopedTypeVariables`, :extension:`LiberalTypeSynonyms`, :implied by: :extension:`ScopedTypeVariables`, :extension:`LiberalTypeSynonyms`,
:extension:`RankNTypes`, :extension:`ExistentialQuantification` :extension:`RankNTypes`, :extension:`ExistentialQuantification`
......
...@@ -4,9 +4,8 @@ Explicit namespaces in import/export ...@@ -4,9 +4,8 @@ Explicit namespaces in import/export
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. extension:: ExplicitNamespaces .. extension:: ExplicitNamespaces
:shortdesc: Enable using the keyword ``type`` to specify the namespace of :shortdesc: Allow use of the keyword ``type`` to specify the namespace of
entries in imports and exports (:ref:`explicit-namespaces`). entries in imports and exports.
Implied by :extension:`TypeOperators` and :extension:`TypeFamilies`.
:implied by: :extension:`TypeOperators`, :extension:`TypeFamilies` :implied by: :extension:`TypeOperators`, :extension:`TypeFamilies`
:since: 7.6.1 :since: 7.6.1
......
...@@ -4,7 +4,7 @@ Sized primitive literal syntax ...@@ -4,7 +4,7 @@ Sized primitive literal syntax
------------------------------ ------------------------------
.. extension:: ExtendedLiterals .. extension:: ExtendedLiterals
:shortdesc: Enable numeric literal postfix syntax for unboxed integers. :shortdesc: Allow numeric literal postfix syntax for unboxed integers.
:since: 9.8.1 :since: 9.8.1
......
...@@ -8,7 +8,7 @@ Foreign function interface (FFI) ...@@ -8,7 +8,7 @@ Foreign function interface (FFI)
single: interfacing with native code single: interfacing with native code
.. extension:: ForeignFunctionInterface .. extension:: ForeignFunctionInterface
:shortdesc: Enable foreign function interface. :shortdesc: Allow foreign function interface syntax.
:since: 6.8.1 :since: 6.8.1
...@@ -114,7 +114,7 @@ Unlifted FFI Types ...@@ -114,7 +114,7 @@ Unlifted FFI Types
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
.. extension:: UnliftedFFITypes .. extension:: UnliftedFFITypes
:shortdesc: Enable unlifted FFI types :shortdesc: Allow the types of foreign imports to contain certain unlifted types.
:since: 6.8.1 :since: 6.8.1
...@@ -282,7 +282,7 @@ Primitive imports ...@@ -282,7 +282,7 @@ Primitive imports
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
.. extension:: GHCForeignImportPrim .. extension:: GHCForeignImportPrim
:shortdesc: Enable prim calling convention. Intended for internal use only. :shortdesc: Allow ``prim`` calling convention. Intended for internal use only.
:since: 6.12.1 :since: 6.12.1
...@@ -310,7 +310,7 @@ Interruptible foreign calls ...@@ -310,7 +310,7 @@ Interruptible foreign calls
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. extension:: InterruptibleFFI .. extension:: InterruptibleFFI
:shortdesc: Enable interruptible FFI. :shortdesc: Allow ``interruptible`` FFI imports.
:since: 7.2.1 :since: 7.2.1
...@@ -394,7 +394,7 @@ The CAPI calling convention ...@@ -394,7 +394,7 @@ The CAPI calling convention
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. extension:: CApiFFI .. extension:: CApiFFI
:shortdesc: Enable the CAPI calling convention. :shortdesc: Allow ``foreign import``\ s to be declared with the ``capi`` calling convention.
:since: 7.6.1 :since: 7.6.1
......
...@@ -4,7 +4,7 @@ Field selectors ...@@ -4,7 +4,7 @@ Field selectors
--------------- ---------------
.. extension:: FieldSelectors .. extension:: FieldSelectors
:shortdesc: Control visibility of field selector functions. :shortdesc: Make record field selector functions visible in expressions.
:since: 9.2.1 :since: 9.2.1
:status: Included in :extension:`GHC2024`, :extension:`GHC2021`, :extension:`Haskell2010`, :extension:`Haskell98` :status: Included in :extension:`GHC2024`, :extension:`GHC2021`, :extension:`Haskell2010`, :extension:`Haskell98`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment