From 6e18ce2bc1a315a97f9d13e52a2a09a5337c5d67 Mon Sep 17 00:00:00 2001 From: Ben Gamari <ben@smart-cactus.org> Date: Wed, 13 Sep 2023 15:22:42 -0400 Subject: [PATCH] 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. --- .../expected-undocumented-flags.txt | 4 ---- docs/users_guide/exts/applicative_do.rst | 2 +- docs/users_guide/exts/arrows.rst | 2 +- docs/users_guide/exts/binary_literals.rst | 2 +- .../exts/constrained_class_methods.rst | 3 +-- docs/users_guide/exts/constraint_kind.rst | 2 +- docs/users_guide/exts/data_kinds.rst | 2 +- docs/users_guide/exts/default_signatures.rst | 2 +- docs/users_guide/exts/derive_any_class.rst | 2 +- docs/users_guide/exts/deriving_extra.rst | 13 +++++-------- docs/users_guide/exts/deriving_strategies.rst | 2 +- docs/users_guide/exts/deriving_via.rst | 3 +-- .../exts/disambiguate_record_fields.rst | 3 +-- docs/users_guide/exts/empty_case.rst | 2 +- .../exts/existential_quantification.rst | 2 +- docs/users_guide/exts/explicit_forall.rst | 4 +--- docs/users_guide/exts/explicit_namespaces.rst | 5 ++--- docs/users_guide/exts/extended_literals.rst | 2 +- docs/users_guide/exts/ffi.rst | 10 +++++----- docs/users_guide/exts/field_selectors.rst | 2 +- .../exts/functional_dependencies.rst | 3 +-- docs/users_guide/exts/gadt.rst | 3 +-- docs/users_guide/exts/gadt_syntax.rst | 2 +- .../exts/generalised_list_comprehensions.rst | 2 +- docs/users_guide/exts/generics.rst | 2 +- docs/users_guide/exts/hex_float_literals.rst | 2 +- docs/users_guide/exts/implicit_parameters.rst | 2 +- .../exts/import_qualified_post.rst | 2 +- docs/users_guide/exts/impredicative_types.rst | 3 +-- docs/users_guide/exts/instances.rst | 19 +++++++++---------- docs/users_guide/exts/kind_signatures.rst | 3 +-- docs/users_guide/exts/lambda_case.rst | 2 +- docs/users_guide/exts/let_generalisation.rst | 3 +-- .../exts/liberal_type_synonyms.rst | 2 +- docs/users_guide/exts/linear_types.rst | 2 +- .../users_guide/exts/monad_comprehensions.rst | 2 +- docs/users_guide/exts/monomorphism.rst | 12 ++++++------ .../exts/multi_param_type_classes.rst | 4 +--- docs/users_guide/exts/multiway_if.rst | 2 +- docs/users_guide/exts/negative_literals.rst | 2 +- docs/users_guide/exts/newtype_deriving.rst | 2 +- docs/users_guide/exts/nk_patterns.rst | 5 ++--- .../users_guide/exts/nullary_type_classes.rst | 2 +- docs/users_guide/exts/num_decimals.rst | 2 +- docs/users_guide/exts/numeric_underscores.rst | 2 +- docs/users_guide/exts/overloaded_labels.rst | 2 +- docs/users_guide/exts/overloaded_lists.rst | 2 +- .../exts/overloaded_record_dot.rst | 2 +- .../exts/overloaded_record_update.rst | 4 ++-- docs/users_guide/exts/overloaded_strings.rst | 2 +- .../exts/package_qualified_imports.rst | 2 +- .../exts/parallel_list_comprehensions.rst | 2 +- .../exts/partial_type_signatures.rst | 4 ++-- docs/users_guide/exts/pattern_guards.rst | 19 +++++++++++++------ docs/users_guide/exts/pattern_synonyms.rst | 2 +- docs/users_guide/exts/poly_kinds.rst | 7 +++---- docs/users_guide/exts/primitives.rst | 8 ++++---- docs/users_guide/exts/qualified_do.rst | 2 +- docs/users_guide/exts/rank_polymorphism.rst | 6 ++---- docs/users_guide/exts/rebindable_syntax.rst | 16 +++++++--------- docs/users_guide/exts/record_puns.rst | 2 +- docs/users_guide/exts/record_wildcards.rst | 3 +-- docs/users_guide/exts/recursive_do.rst | 2 +- .../exts/required_type_arguments.rst | 4 ++-- docs/users_guide/exts/roles.rst | 2 +- .../exts/scoped_type_variables.rst | 2 +- docs/users_guide/exts/standalone_deriving.rst | 2 +- docs/users_guide/exts/static_pointers.rst | 2 +- docs/users_guide/exts/strict.rst | 4 ++-- docs/users_guide/exts/template_haskell.rst | 13 ++++++------- .../exts/traditional_record_syntax.rst | 8 ++++---- docs/users_guide/exts/tuple_sections.rst | 2 +- docs/users_guide/exts/type_abstractions.rst | 2 +- docs/users_guide/exts/type_applications.rst | 4 ++-- docs/users_guide/exts/type_data.rst | 2 +- docs/users_guide/exts/type_families.rst | 7 ++----- docs/users_guide/exts/type_operators.rst | 3 +-- docs/users_guide/exts/view_patterns.rst | 2 +- docs/users_guide/phases.rst | 2 +- 79 files changed, 139 insertions(+), 165 deletions(-) diff --git a/docs/users_guide/expected-undocumented-flags.txt b/docs/users_guide/expected-undocumented-flags.txt index b6ad2f817c73..1c7829f39954 100644 --- a/docs/users_guide/expected-undocumented-flags.txt +++ b/docs/users_guide/expected-undocumented-flags.txt @@ -9,17 +9,13 @@ -XAutoDeriveTypeable -XDoAndIfThenElse -XDoRec --XImplicitPrelude -XJavaScriptFFI --XMonomorphismRestriction -XParallelArrays --XPatternGuards -XPatternSignatures -XPolymorphicComponents -XRecordPuns -XRelaxedLayout -XRelaxedPolyRec --XTraditionalRecordSyntax -copy-libs-when-linking -dannot-lint -dppr-ticks diff --git a/docs/users_guide/exts/applicative_do.rst b/docs/users_guide/exts/applicative_do.rst index a46d74d9574b..4e313f00ae76 100644 --- a/docs/users_guide/exts/applicative_do.rst +++ b/docs/users_guide/exts/applicative_do.rst @@ -8,7 +8,7 @@ Applicative do-notation single: do-notation; Applicative .. extension:: ApplicativeDo - :shortdesc: Enable Applicative do-notation desugaring + :shortdesc: Allow do-notation statements to be desugared via ``Applicative``. :since: 8.0.1 diff --git a/docs/users_guide/exts/arrows.rst b/docs/users_guide/exts/arrows.rst index e0be97853a37..44a07cb47706 100644 --- a/docs/users_guide/exts/arrows.rst +++ b/docs/users_guide/exts/arrows.rst @@ -4,7 +4,7 @@ Arrow notation ============== .. extension:: Arrows - :shortdesc: Enable arrow notation extension + :shortdesc: Allow arrow notation (e.g. ``proc``) :since: 6.8.1 diff --git a/docs/users_guide/exts/binary_literals.rst b/docs/users_guide/exts/binary_literals.rst index b65f6522f671..8aedfe0382f9 100644 --- a/docs/users_guide/exts/binary_literals.rst +++ b/docs/users_guide/exts/binary_literals.rst @@ -4,7 +4,7 @@ Binary integer literals ----------------------- .. extension:: BinaryLiterals - :shortdesc: Enable support for binary literals. + :shortdesc: Allow binary literal syntax. :since: 7.10.1 diff --git a/docs/users_guide/exts/constrained_class_methods.rst b/docs/users_guide/exts/constrained_class_methods.rst index f28bf0c55dd3..b358fc2a55fb 100644 --- a/docs/users_guide/exts/constrained_class_methods.rst +++ b/docs/users_guide/exts/constrained_class_methods.rst @@ -4,8 +4,7 @@ Constrained class method types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: ConstrainedClassMethods - :shortdesc: Enable constrained class methods. - Implied by :extension:`MultiParamTypeClasses`. + :shortdesc: Allow class methods to have non-empty contexts. :since: 6.8.1 diff --git a/docs/users_guide/exts/constraint_kind.rst b/docs/users_guide/exts/constraint_kind.rst index 7915b893884e..7501c062bea3 100644 --- a/docs/users_guide/exts/constraint_kind.rst +++ b/docs/users_guide/exts/constraint_kind.rst @@ -4,7 +4,7 @@ The ``Constraint`` kind ----------------------- .. extension:: ConstraintKinds - :shortdesc: Enable a kind of constraints. + :shortdesc: Allow constraints to be used as types of kind ``Constraint``. :since: 7.4.1 diff --git a/docs/users_guide/exts/data_kinds.rst b/docs/users_guide/exts/data_kinds.rst index 57d1f5447583..5cf70642de34 100644 --- a/docs/users_guide/exts/data_kinds.rst +++ b/docs/users_guide/exts/data_kinds.rst @@ -4,7 +4,7 @@ Datatype promotion ================== .. extension:: DataKinds - :shortdesc: Enable datatype promotion. + :shortdesc: Allow use of data constructors in types. :since: 7.4.1 diff --git a/docs/users_guide/exts/default_signatures.rst b/docs/users_guide/exts/default_signatures.rst index 210bbea560ac..5d5b02d6f122 100644 --- a/docs/users_guide/exts/default_signatures.rst +++ b/docs/users_guide/exts/default_signatures.rst @@ -4,7 +4,7 @@ Default method signatures ~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: DefaultSignatures - :shortdesc: Enable default signatures. + :shortdesc: Allow default signatures for typeclass methods. :since: 7.2.1 diff --git a/docs/users_guide/exts/derive_any_class.rst b/docs/users_guide/exts/derive_any_class.rst index 4cd241d9b0d6..a9d560fcdd32 100644 --- a/docs/users_guide/exts/derive_any_class.rst +++ b/docs/users_guide/exts/derive_any_class.rst @@ -4,7 +4,7 @@ Deriving any other class ------------------------ .. extension:: DeriveAnyClass - :shortdesc: Enable deriving for any class. + :shortdesc: Allow ``deriving`` syntax to be used for any class. :since: 7.10.1 diff --git a/docs/users_guide/exts/deriving_extra.rst b/docs/users_guide/exts/deriving_extra.rst index 9f3374e0f146..683075ca4a87 100644 --- a/docs/users_guide/exts/deriving_extra.rst +++ b/docs/users_guide/exts/deriving_extra.rst @@ -50,8 +50,7 @@ Deriving ``Functor`` instances ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: DeriveFunctor - :shortdesc: Enable deriving for the Functor class. - Implied by :extension:`DeriveTraversable`. + :shortdesc: Allow deriving for the ``Functor`` class. :implied by: :extension:`DeriveTraversable` :since: 7.10.1 @@ -246,8 +245,7 @@ Deriving ``Foldable`` instances ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: DeriveFoldable - :shortdesc: Enable deriving for the Foldable class. - Implied by :extension:`DeriveTraversable`. + :shortdesc: Allow deriving for the ``Foldable`` class. :implied by: :extension:`DeriveTraversable` :since: 7.10.1 @@ -389,8 +387,7 @@ Deriving ``Traversable`` instances .. extension:: DeriveTraversable - :shortdesc: Enable deriving for the Traversable class. - Implies :extension:`DeriveFunctor` and :extension:`DeriveFoldable`. + :shortdesc: Allow deriving for the ``Traversable`` class. :implies: :extension:`DeriveFoldable`, :extension:`DeriveFunctor` :implied by: :extension:`GHC2021` @@ -469,7 +466,7 @@ Deriving ``Data`` instances ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: DeriveDataTypeable - :shortdesc: Enable deriving for the ``Data`` class. + :shortdesc: Allow deriving for the ``Data`` class. :since: 6.8.1 :status: Included in :extension:`GHC2024`, :extension:`GHC2021` @@ -523,7 +520,7 @@ Deriving ``Lift`` instances ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: DeriveLift - :shortdesc: Enable deriving for the Lift class + :shortdesc: Allow deriving for the ``Lift`` class :since: 8.0.1 :status: Included in :extension:`GHC2024`, :extension:`GHC2021` diff --git a/docs/users_guide/exts/deriving_strategies.rst b/docs/users_guide/exts/deriving_strategies.rst index 7a879a9cde3d..2b734539a91b 100644 --- a/docs/users_guide/exts/deriving_strategies.rst +++ b/docs/users_guide/exts/deriving_strategies.rst @@ -4,7 +4,7 @@ Deriving strategies ------------------- .. extension:: DerivingStrategies - :shortdesc: Enables deriving strategies. + :shortdesc: Allow use of instance deriving strategies. :since: 8.2.1 diff --git a/docs/users_guide/exts/deriving_via.rst b/docs/users_guide/exts/deriving_via.rst index 26ff719780ee..b9614edbebe0 100644 --- a/docs/users_guide/exts/deriving_via.rst +++ b/docs/users_guide/exts/deriving_via.rst @@ -4,9 +4,8 @@ Deriving via ------------ .. extension:: DerivingVia - :shortdesc: Enable deriving instances ``via`` types of the same runtime + :shortdesc: Allow deriving instances ``via`` types of the same runtime representation. - Implies :extension:`DerivingStrategies`. :implies: :extension:`DerivingStrategies` diff --git a/docs/users_guide/exts/disambiguate_record_fields.rst b/docs/users_guide/exts/disambiguate_record_fields.rst index 6e0653d64113..d1e7deeb82f2 100644 --- a/docs/users_guide/exts/disambiguate_record_fields.rst +++ b/docs/users_guide/exts/disambiguate_record_fields.rst @@ -4,8 +4,7 @@ Record field disambiguation --------------------------- .. extension:: DisambiguateRecordFields - :shortdesc: Enable record field disambiguation. - Implied by :extension:`RecordWildCards`. + :shortdesc: Automatically disambiguate some record field references. :since: 6.8.1 :implied by: :extension:`RecordWildCards`, :extension:`DuplicateRecordFields` diff --git a/docs/users_guide/exts/empty_case.rst b/docs/users_guide/exts/empty_case.rst index 0b4e7ce6deac..bc8c50f952b7 100644 --- a/docs/users_guide/exts/empty_case.rst +++ b/docs/users_guide/exts/empty_case.rst @@ -4,7 +4,7 @@ Empty case alternatives ----------------------- .. extension:: EmptyCase - :shortdesc: Allow empty case alternatives. + :shortdesc: Allow ``case`` expressions with no alternatives. :since: 7.8.1 :status: Included in :extension:`GHC2024`, :extension:`GHC2021` diff --git a/docs/users_guide/exts/existential_quantification.rst b/docs/users_guide/exts/existential_quantification.rst index b71ccf74175b..e018afd46fea 100644 --- a/docs/users_guide/exts/existential_quantification.rst +++ b/docs/users_guide/exts/existential_quantification.rst @@ -4,7 +4,7 @@ Existentially quantified data constructors ------------------------------------------ .. extension:: ExistentialQuantification - :shortdesc: Enable liberalised type synonyms. + :shortdesc: Allow existentially quantified type variables in types. :implies: :extension:`ExplicitForAll` :since: 6.8.1 diff --git a/docs/users_guide/exts/explicit_forall.rst b/docs/users_guide/exts/explicit_forall.rst index ef470cc22da3..c242216c5bdf 100644 --- a/docs/users_guide/exts/explicit_forall.rst +++ b/docs/users_guide/exts/explicit_forall.rst @@ -4,9 +4,7 @@ Explicit universal quantification (forall) ------------------------------------------ .. extension:: ExplicitForAll - :shortdesc: Enable explicit universal quantification. - Implied by :extension:`ScopedTypeVariables`, :extension:`LiberalTypeSynonyms`, - :extension:`RankNTypes` and :extension:`ExistentialQuantification`. + :shortdesc: Allow explicit universal quantification. :implied by: :extension:`ScopedTypeVariables`, :extension:`LiberalTypeSynonyms`, :extension:`RankNTypes`, :extension:`ExistentialQuantification` diff --git a/docs/users_guide/exts/explicit_namespaces.rst b/docs/users_guide/exts/explicit_namespaces.rst index 0e6509c31bb6..18f4f10106d4 100644 --- a/docs/users_guide/exts/explicit_namespaces.rst +++ b/docs/users_guide/exts/explicit_namespaces.rst @@ -4,9 +4,8 @@ Explicit namespaces in import/export ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: ExplicitNamespaces - :shortdesc: Enable using the keyword ``type`` to specify the namespace of - entries in imports and exports (:ref:`explicit-namespaces`). - Implied by :extension:`TypeOperators` and :extension:`TypeFamilies`. + :shortdesc: Allow use of the keyword ``type`` to specify the namespace of + entries in imports and exports. :implied by: :extension:`TypeOperators`, :extension:`TypeFamilies` :since: 7.6.1 diff --git a/docs/users_guide/exts/extended_literals.rst b/docs/users_guide/exts/extended_literals.rst index ac61f2d4108c..dc5cc7e586ee 100644 --- a/docs/users_guide/exts/extended_literals.rst +++ b/docs/users_guide/exts/extended_literals.rst @@ -4,7 +4,7 @@ Sized primitive literal syntax ------------------------------ .. extension:: ExtendedLiterals - :shortdesc: Enable numeric literal postfix syntax for unboxed integers. + :shortdesc: Allow numeric literal postfix syntax for unboxed integers. :since: 9.8.1 diff --git a/docs/users_guide/exts/ffi.rst b/docs/users_guide/exts/ffi.rst index 4000c5cd7399..2889fb141008 100644 --- a/docs/users_guide/exts/ffi.rst +++ b/docs/users_guide/exts/ffi.rst @@ -8,7 +8,7 @@ Foreign function interface (FFI) single: interfacing with native code .. extension:: ForeignFunctionInterface - :shortdesc: Enable foreign function interface. + :shortdesc: Allow foreign function interface syntax. :since: 6.8.1 @@ -114,7 +114,7 @@ Unlifted FFI Types ~~~~~~~~~~~~~~~~~~ .. extension:: UnliftedFFITypes - :shortdesc: Enable unlifted FFI types + :shortdesc: Allow the types of foreign imports to contain certain unlifted types. :since: 6.8.1 @@ -282,7 +282,7 @@ Primitive imports ~~~~~~~~~~~~~~~~~ .. 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 @@ -310,7 +310,7 @@ Interruptible foreign calls ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: InterruptibleFFI - :shortdesc: Enable interruptible FFI. + :shortdesc: Allow ``interruptible`` FFI imports. :since: 7.2.1 @@ -394,7 +394,7 @@ The CAPI calling convention ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. 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 diff --git a/docs/users_guide/exts/field_selectors.rst b/docs/users_guide/exts/field_selectors.rst index e22f920f9801..1d8018640c8d 100644 --- a/docs/users_guide/exts/field_selectors.rst +++ b/docs/users_guide/exts/field_selectors.rst @@ -4,7 +4,7 @@ Field selectors --------------- .. extension:: FieldSelectors - :shortdesc: Control visibility of field selector functions. + :shortdesc: Make record field selector functions visible in expressions. :since: 9.2.1 :status: Included in :extension:`GHC2024`, :extension:`GHC2021`, :extension:`Haskell2010`, :extension:`Haskell98` diff --git a/docs/users_guide/exts/functional_dependencies.rst b/docs/users_guide/exts/functional_dependencies.rst index d8d4ca9badbd..a75e4afe7de6 100644 --- a/docs/users_guide/exts/functional_dependencies.rst +++ b/docs/users_guide/exts/functional_dependencies.rst @@ -4,8 +4,7 @@ Functional dependencies ----------------------- .. extension:: FunctionalDependencies - :shortdesc: Enable functional dependencies. - Implies :extension:`MultiParamTypeClasses`. + :shortdesc: Allow functional dependencies to be given on typeclass declarations. :implies: :extension:`MultiParamTypeClasses` :since: 6.8.1 diff --git a/docs/users_guide/exts/gadt.rst b/docs/users_guide/exts/gadt.rst index 856322077b31..646480d4b5e4 100644 --- a/docs/users_guide/exts/gadt.rst +++ b/docs/users_guide/exts/gadt.rst @@ -4,8 +4,7 @@ Generalised Algebraic Data Types (GADTs) ---------------------------------------- .. extension:: GADTs - :shortdesc: Enable generalised algebraic data types. - Implies :extension:`GADTSyntax` and :extension:`MonoLocalBinds`. + :shortdesc: Allow definition of generalised algebraic data types. :implies: :extension:`MonoLocalBinds`, :extension:`GADTSyntax` :since: 6.8.1 diff --git a/docs/users_guide/exts/gadt_syntax.rst b/docs/users_guide/exts/gadt_syntax.rst index 239dd0326e7c..434de3d48422 100644 --- a/docs/users_guide/exts/gadt_syntax.rst +++ b/docs/users_guide/exts/gadt_syntax.rst @@ -4,7 +4,7 @@ Declaring data types with explicit constructor signatures --------------------------------------------------------- .. extension:: GADTSyntax - :shortdesc: Enable generalised algebraic data type syntax. + :shortdesc: Allow generalised algebraic data type syntax. :implied by: :extension:`GADTs` :since: 7.2.1 diff --git a/docs/users_guide/exts/generalised_list_comprehensions.rst b/docs/users_guide/exts/generalised_list_comprehensions.rst index 4676ca0a0c15..5ab02aea838e 100644 --- a/docs/users_guide/exts/generalised_list_comprehensions.rst +++ b/docs/users_guide/exts/generalised_list_comprehensions.rst @@ -10,7 +10,7 @@ Generalised (SQL-like) List Comprehensions single: SQL .. extension:: TransformListComp - :shortdesc: Enable generalised list comprehensions. + :shortdesc: Allow generalised list comprehension syntax. :since: 6.10.1 diff --git a/docs/users_guide/exts/generics.rst b/docs/users_guide/exts/generics.rst index f7a21bcb0920..bb3fd1e42ec8 100644 --- a/docs/users_guide/exts/generics.rst +++ b/docs/users_guide/exts/generics.rst @@ -92,7 +92,7 @@ containers, such as ``map``. Note that ``Generic1`` ranges over types of kind enabled, then it can range of types of kind ``k -> Type``, for any kind ``k``. .. extension:: DeriveGeneric - :shortdesc: Enable deriving for the Generic class. + :shortdesc: Allow deriving of ``Generic`` instances. :since: 7.2.1 diff --git a/docs/users_guide/exts/hex_float_literals.rst b/docs/users_guide/exts/hex_float_literals.rst index 7ebe6551b429..aeaaa6a4b2e9 100644 --- a/docs/users_guide/exts/hex_float_literals.rst +++ b/docs/users_guide/exts/hex_float_literals.rst @@ -4,7 +4,7 @@ Hexadecimal floating point literals ----------------------------------- .. extension:: HexFloatLiterals - :shortdesc: Enable support for :ref:`hexadecimal floating point literals <hex-float-literals>`. + :shortdesc: Allow hexadecimal floating-point literal syntax. :since: 8.4.1 diff --git a/docs/users_guide/exts/implicit_parameters.rst b/docs/users_guide/exts/implicit_parameters.rst index e8dc5ac2fae3..1224216d4380 100644 --- a/docs/users_guide/exts/implicit_parameters.rst +++ b/docs/users_guide/exts/implicit_parameters.rst @@ -4,7 +4,7 @@ Implicit parameters =================== .. extension:: ImplicitParams - :shortdesc: Enable Implicit Parameters. + :shortdesc: Allow implicit parameter constraints. :since: 6.8.1 diff --git a/docs/users_guide/exts/import_qualified_post.rst b/docs/users_guide/exts/import_qualified_post.rst index b89a70d986f4..b02dbc3bf401 100644 --- a/docs/users_guide/exts/import_qualified_post.rst +++ b/docs/users_guide/exts/import_qualified_post.rst @@ -4,7 +4,7 @@ Writing qualified in postpositive position ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: ImportQualifiedPost - :shortdesc: ``ImportQualifiedPost`` allows the syntax ``import M qualified`` + :shortdesc: Allows the syntax ``import M qualified`` :since: 8.10.1 diff --git a/docs/users_guide/exts/impredicative_types.rst b/docs/users_guide/exts/impredicative_types.rst index 109ca28ea0e4..8b16750d66d4 100644 --- a/docs/users_guide/exts/impredicative_types.rst +++ b/docs/users_guide/exts/impredicative_types.rst @@ -4,8 +4,7 @@ Impredicative polymorphism ========================== .. extension:: ImpredicativeTypes - :shortdesc: Enable impredicative types. - Implies :extension:`RankNTypes`. + :shortdesc: Allow impredicative types. :implies: :extension:`RankNTypes` :since: 9.2.1 (unreliable in 6.10 - 9.0) diff --git a/docs/users_guide/exts/instances.rst b/docs/users_guide/exts/instances.rst index 75f58ef0661c..78cd938020e4 100644 --- a/docs/users_guide/exts/instances.rst +++ b/docs/users_guide/exts/instances.rst @@ -42,8 +42,7 @@ Relaxed rules for the instance head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: TypeSynonymInstances - :shortdesc: Enable type synonyms in instance heads. - Implied by :extension:`FlexibleInstances`. + :shortdesc: Allow type synonyms to be mentioned in instance heads. :implied by: :extension:`FlexibleInstances` :since: 6.8.1 @@ -53,8 +52,7 @@ Relaxed rules for the instance head Allow definition of type class instances for type synonyms. .. extension:: FlexibleInstances - :shortdesc: Enable flexible instances. - Implies :extension:`TypeSynonymInstances`. + :shortdesc: Allow instance heads to mention arbitrary nested types. :implies: :extension:`TypeSynonymInstances` @@ -65,7 +63,7 @@ Relaxed rules for the instance head Allow definition of type class instances with arbitrary nested types in the instance head. -In Haskell 98 the head of an instance declaration must be of the form +In Haskell 2010 the head of an instance declaration must be of the form ``C (T a1 ... an)``, where ``C`` is the class, ``T`` is a data type constructor, and the ``a1 ... an`` are distinct type variables. In the case of multi-parameter type classes, this rule applies to each @@ -319,7 +317,7 @@ Undecidable instances and loopy superclasses ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: UndecidableInstances - :shortdesc: Enable undecidable instances. + :shortdesc: Allow definition of instances which may make solving undecidable. :since: 6.8.1 @@ -412,7 +410,7 @@ Overlapping instances ~~~~~~~~~~~~~~~~~~~~~ .. extension:: OverlappingInstances - :shortdesc: Enable overlapping instances. + :shortdesc: Allow definition of overlapping instances. :since: 6.8.1 @@ -422,8 +420,9 @@ Overlapping instances termination. .. extension:: IncoherentInstances - :shortdesc: Enable incoherent instances. - Implies :extension:`OverlappingInstances`. + :shortdesc: Allow definitions of instances that may result in incoherence. + + :implies: :extension:`OverlappingInstances`. :since: 6.8.1 @@ -667,7 +666,7 @@ Instance signatures: type signatures in instance declarations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: InstanceSigs - :shortdesc: Enable instance signatures. + :shortdesc: Allow type signatures to be written for instance methods. :since: 7.6.1 diff --git a/docs/users_guide/exts/kind_signatures.rst b/docs/users_guide/exts/kind_signatures.rst index 4b4ced0a37df..c2c8e616bbe0 100644 --- a/docs/users_guide/exts/kind_signatures.rst +++ b/docs/users_guide/exts/kind_signatures.rst @@ -4,8 +4,7 @@ Explicitly-kinded quantification -------------------------------- .. extension:: KindSignatures - :shortdesc: Enable kind signatures. - Implied by :extension:`TypeFamilies` and :extension:`PolyKinds`. + :shortdesc: Allow kind signatures to be given for types. :implied by: :extension:`TypeFamilies`, :extension:`PolyKinds` :since: 6.8.1 diff --git a/docs/users_guide/exts/lambda_case.rst b/docs/users_guide/exts/lambda_case.rst index b6866f3beec9..dfed9745cc30 100644 --- a/docs/users_guide/exts/lambda_case.rst +++ b/docs/users_guide/exts/lambda_case.rst @@ -4,7 +4,7 @@ Lambda-case ----------- .. extension:: LambdaCase - :shortdesc: Enable lambda-case expressions. + :shortdesc: Allow ``\case`` expressions. :since: 7.6.1 :status: Included in :extension:`GHC2024` diff --git a/docs/users_guide/exts/let_generalisation.rst b/docs/users_guide/exts/let_generalisation.rst index 259e9b9d3e30..91eee68d6b53 100644 --- a/docs/users_guide/exts/let_generalisation.rst +++ b/docs/users_guide/exts/let_generalisation.rst @@ -4,8 +4,7 @@ Let-generalisation ------------------ .. extension:: MonoLocalBinds - :shortdesc: Enable do not generalise local bindings. - Implied by :extension:`TypeFamilies` and :extension:`GADTs`. + :shortdesc: Do not generalise types of local bindings. :implied by: :extension:`TypeFamilies`, :extension:`GADTs` :since: 6.12.1 diff --git a/docs/users_guide/exts/liberal_type_synonyms.rst b/docs/users_guide/exts/liberal_type_synonyms.rst index b0e295ab2f6a..766b396e7922 100644 --- a/docs/users_guide/exts/liberal_type_synonyms.rst +++ b/docs/users_guide/exts/liberal_type_synonyms.rst @@ -4,7 +4,7 @@ Liberalised type synonyms ------------------------- .. extension:: LiberalTypeSynonyms - :shortdesc: Enable liberalised type synonyms. + :shortdesc: Relax many of Haskell 98's rules on type synonym definitions. :implies: :extension:`ExplicitForAll` :since: 6.8.1 diff --git a/docs/users_guide/exts/linear_types.rst b/docs/users_guide/exts/linear_types.rst index 5e759e9c91bf..7fd3ef01f5c4 100644 --- a/docs/users_guide/exts/linear_types.rst +++ b/docs/users_guide/exts/linear_types.rst @@ -4,7 +4,7 @@ Linear types ============ .. extension:: LinearTypes - :shortdesc: Enable linear types. + :shortdesc: Allow writing of linear arrow types. Implies :extension:`MonoLocalBinds`. :implies: :extension:`MonoLocalBinds` diff --git a/docs/users_guide/exts/monad_comprehensions.rst b/docs/users_guide/exts/monad_comprehensions.rst index b4afbc1090e7..260d8305ba89 100644 --- a/docs/users_guide/exts/monad_comprehensions.rst +++ b/docs/users_guide/exts/monad_comprehensions.rst @@ -7,7 +7,7 @@ Monad comprehensions single: monad comprehensions .. extension:: MonadComprehensions - :shortdesc: Enable monad comprehensions. + :shortdesc: Allow list comprehension syntax to be used at monads other than ``List``. :since: 7.2.1 diff --git a/docs/users_guide/exts/monomorphism.rst b/docs/users_guide/exts/monomorphism.rst index 7ca01cc9b062..db260bef2275 100644 --- a/docs/users_guide/exts/monomorphism.rst +++ b/docs/users_guide/exts/monomorphism.rst @@ -3,17 +3,17 @@ Switching off the Monomorphism Restriction ------------------------------------------ -.. extension:: NoMonomorphismRestriction - :shortdesc: Disable the monomorphism restriction. +.. extension:: MonomorphismRestriction + :shortdesc: Apply the Haskell 2010 monomorphism restriction. - :default: on + :status: Enabled by default. :since: 6.8.1 - Prevents the compiler from applying the monomorphism restriction to - bindings lacking explicit type signatures. + Apply the monomorphism restriction to bindings lacking explicit type + signatures. Haskell's monomorphism restriction (see `Section -4.5.5 <https://www.haskell.org/onlinereport/decls.html#sect4.5.5>`__ of +4.5.5 <https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-930004.5.5>`__ of the Haskell Report) can be completely switched off by :extension:`NoMonomorphismRestriction`. Since GHC 7.8.1, the monomorphism restriction is switched off by default in GHCi's interactive options diff --git a/docs/users_guide/exts/multi_param_type_classes.rst b/docs/users_guide/exts/multi_param_type_classes.rst index 83a59e5a1995..cb73aba80390 100644 --- a/docs/users_guide/exts/multi_param_type_classes.rst +++ b/docs/users_guide/exts/multi_param_type_classes.rst @@ -4,9 +4,7 @@ Multi-parameter type classes ============================ .. extension:: MultiParamTypeClasses - :shortdesc: Enable multi parameter type classes. - Implied by :extension:`FunctionalDependencies`. - Implies :extension:`ConstrainedClassMethods`. + :shortdesc: Enable multi-parameter type classes. :implies: :extension:`ConstrainedClassMethods` :implied by: :extension:`FunctionalDependencies` diff --git a/docs/users_guide/exts/multiway_if.rst b/docs/users_guide/exts/multiway_if.rst index 3d9fa58ef71e..33294732c8f9 100644 --- a/docs/users_guide/exts/multiway_if.rst +++ b/docs/users_guide/exts/multiway_if.rst @@ -4,7 +4,7 @@ Multi-way if-expressions ------------------------ .. extension:: MultiWayIf - :shortdesc: Enable multi-way if-expressions. + :shortdesc: Allow multi-way ``if``-expressions. :since: 7.6.1 diff --git a/docs/users_guide/exts/negative_literals.rst b/docs/users_guide/exts/negative_literals.rst index fb6cbc3c1f81..78092d297611 100644 --- a/docs/users_guide/exts/negative_literals.rst +++ b/docs/users_guide/exts/negative_literals.rst @@ -4,7 +4,7 @@ Negative literals ----------------- .. extension:: NegativeLiterals - :shortdesc: Enable support for negative literals. + :shortdesc: Allow negative numeric literal syntax. :since: 7.8.1 diff --git a/docs/users_guide/exts/newtype_deriving.rst b/docs/users_guide/exts/newtype_deriving.rst index 94df2a5ad3d7..5af45b3c3677 100644 --- a/docs/users_guide/exts/newtype_deriving.rst +++ b/docs/users_guide/exts/newtype_deriving.rst @@ -5,7 +5,7 @@ Generalised derived instances for newtypes .. extension:: GeneralisedNewtypeDeriving GeneralizedNewtypeDeriving - :shortdesc: Enable newtype deriving. + :shortdesc: Allow instances to be derived via ``newtype`` deriving. :since: 6.8.1. British spelling since 8.6.1. diff --git a/docs/users_guide/exts/nk_patterns.rst b/docs/users_guide/exts/nk_patterns.rst index 4afd49bc5be3..5ebfd9f2b2c1 100644 --- a/docs/users_guide/exts/nk_patterns.rst +++ b/docs/users_guide/exts/nk_patterns.rst @@ -4,11 +4,10 @@ n+k patterns ------------ .. extension:: NPlusKPatterns - :shortdesc: Enable support for ``n+k`` patterns. - Implied by :extension:`Haskell98`. + :shortdesc: Allow use of ``n+k`` patterns. :since: 6.12.1 :status: Included in :extension:`Haskell98` - Enable use of ``n+k`` patterns. + Allow use of ``n+k`` patterns. diff --git a/docs/users_guide/exts/nullary_type_classes.rst b/docs/users_guide/exts/nullary_type_classes.rst index 516854f5cf4f..859732b46d35 100644 --- a/docs/users_guide/exts/nullary_type_classes.rst +++ b/docs/users_guide/exts/nullary_type_classes.rst @@ -4,7 +4,7 @@ Nullary type classes ~~~~~~~~~~~~~~~~~~~~ .. extension:: NullaryTypeClasses - :shortdesc: Deprecated, does nothing. nullary (no parameter) type + :shortdesc: Deprecated, does nothing. nullary type classes are now enabled using :extension:`MultiParamTypeClasses`. :since: 7.8.1 diff --git a/docs/users_guide/exts/num_decimals.rst b/docs/users_guide/exts/num_decimals.rst index 3f3119211249..1ed716710704 100644 --- a/docs/users_guide/exts/num_decimals.rst +++ b/docs/users_guide/exts/num_decimals.rst @@ -4,7 +4,7 @@ Fractional looking integer literals ----------------------------------- .. extension:: NumDecimals - :shortdesc: Enable support for 'fractional' integer literals. + :shortdesc: Allow use of scientific notation syntax for integer literals. :since: 7.8.1 diff --git a/docs/users_guide/exts/numeric_underscores.rst b/docs/users_guide/exts/numeric_underscores.rst index c8a9d708a7b0..a99a666cf327 100644 --- a/docs/users_guide/exts/numeric_underscores.rst +++ b/docs/users_guide/exts/numeric_underscores.rst @@ -4,7 +4,7 @@ Numeric underscores ------------------- .. extension:: NumericUnderscores - :shortdesc: Enable support for :ref:`numeric underscores <numeric-underscores>`. + :shortdesc: Allow underscores in numeric literals. :since: 8.6.1 diff --git a/docs/users_guide/exts/overloaded_labels.rst b/docs/users_guide/exts/overloaded_labels.rst index 33e885c8739b..21888446f138 100644 --- a/docs/users_guide/exts/overloaded_labels.rst +++ b/docs/users_guide/exts/overloaded_labels.rst @@ -4,7 +4,7 @@ Overloaded labels ----------------- .. extension:: OverloadedLabels - :shortdesc: Enable overloaded labels. + :shortdesc: Allow overloaded label syntax. :since: 8.0.1 diff --git a/docs/users_guide/exts/overloaded_lists.rst b/docs/users_guide/exts/overloaded_lists.rst index 1f4ef363a532..26de5c1bcde9 100644 --- a/docs/users_guide/exts/overloaded_lists.rst +++ b/docs/users_guide/exts/overloaded_lists.rst @@ -4,7 +4,7 @@ Overloaded lists ---------------- .. extension:: OverloadedLists - :shortdesc: Enable overloaded lists. + :shortdesc: Desugar list syntax via the ``IsList`` class. :since: 7.8.1 diff --git a/docs/users_guide/exts/overloaded_record_dot.rst b/docs/users_guide/exts/overloaded_record_dot.rst index 26f29b352c89..e4242690cd8f 100644 --- a/docs/users_guide/exts/overloaded_record_dot.rst +++ b/docs/users_guide/exts/overloaded_record_dot.rst @@ -4,7 +4,7 @@ Overloaded record dot --------------------- .. extension:: OverloadedRecordDot - :shortdesc: Record '.' syntax + :shortdesc: Allow ``.`` to be used for record field access. :since: 9.2.0 diff --git a/docs/users_guide/exts/overloaded_record_update.rst b/docs/users_guide/exts/overloaded_record_update.rst index 2e9df747dcaa..ad436526bcf8 100644 --- a/docs/users_guide/exts/overloaded_record_update.rst +++ b/docs/users_guide/exts/overloaded_record_update.rst @@ -4,11 +4,11 @@ Overloaded record update ------------------------ .. extension:: OverloadedRecordUpdate - :shortdesc: Record '.' syntax record updates + :shortdesc: Allow ``.`` syntax in record updates :since: 9.2.0 - Provides record '.' syntax in record updates e.g. ``x{foo.bar = 1}``. + Provides record ``.`` syntax in record updates e.g. ``x{foo.bar = 1}``. **EXPERIMENTAL** *This design of this extension may well change in the future. It would be inadvisable to start using this extension for long-lived libraries just yet.* diff --git a/docs/users_guide/exts/overloaded_strings.rst b/docs/users_guide/exts/overloaded_strings.rst index 848bc5a271c0..553d08762d0e 100644 --- a/docs/users_guide/exts/overloaded_strings.rst +++ b/docs/users_guide/exts/overloaded_strings.rst @@ -4,7 +4,7 @@ Overloaded string literals -------------------------- .. extension:: OverloadedStrings - :shortdesc: Enable overloaded string literals. + :shortdesc: Desugar string literals via ``IsString`` class. :since: 6.8.1 diff --git a/docs/users_guide/exts/package_qualified_imports.rst b/docs/users_guide/exts/package_qualified_imports.rst index e43473f75dcc..85677c95ee19 100644 --- a/docs/users_guide/exts/package_qualified_imports.rst +++ b/docs/users_guide/exts/package_qualified_imports.rst @@ -4,7 +4,7 @@ Package-qualified imports ~~~~~~~~~~~~~~~~~~~~~~~~~ .. extension:: PackageImports - :shortdesc: Enable package-qualified imports. + :shortdesc: Allow package-qualified ``import`` syntax. :since: 6.10.1 diff --git a/docs/users_guide/exts/parallel_list_comprehensions.rst b/docs/users_guide/exts/parallel_list_comprehensions.rst index 4b6031daa79b..2e1863dc9f98 100644 --- a/docs/users_guide/exts/parallel_list_comprehensions.rst +++ b/docs/users_guide/exts/parallel_list_comprehensions.rst @@ -8,7 +8,7 @@ Parallel List Comprehensions single: parallel list comprehensions .. extension:: ParallelListComp - :shortdesc: Enable parallel list comprehensions. + :shortdesc: Allow parallel list comprehension syntax. :since: 6.8.1 diff --git a/docs/users_guide/exts/partial_type_signatures.rst b/docs/users_guide/exts/partial_type_signatures.rst index c6e1b30952ae..89e6e4629721 100644 --- a/docs/users_guide/exts/partial_type_signatures.rst +++ b/docs/users_guide/exts/partial_type_signatures.rst @@ -4,7 +4,7 @@ Partial Type Signatures ======================= .. extension:: PartialTypeSignatures - :shortdesc: Enable partial type signatures. + :shortdesc: Allow type signatures to contain wildcards. :since: 7.10.1 @@ -121,7 +121,7 @@ Named Wildcards ~~~~~~~~~~~~~~~ .. extension:: NamedWildCards - :shortdesc: Enable named wildcards. + :shortdesc: Allow named wildcards in types. :since: 7.10.1 diff --git a/docs/users_guide/exts/pattern_guards.rst b/docs/users_guide/exts/pattern_guards.rst index 5ca2c954039f..23eb4bd1be00 100644 --- a/docs/users_guide/exts/pattern_guards.rst +++ b/docs/users_guide/exts/pattern_guards.rst @@ -3,12 +3,19 @@ Pattern guards -------------- -.. extension:: NoPatternGuards - :shortdesc: Disable pattern guards. - Implied by :extension:`Haskell98`. +.. extension:: PatternGuards + :shortdesc: Allow pattern guards syntax. :since: 6.8.1 - :status: Included in :extension:`Haskell98` + :status: Disabled in :extension:`Haskell98`, enabled in :extension:`Haskell2010` and later. -Disable `pattern guards -<https://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-460003.13>`__. + Haskell 2010 allows pattern match guards to contain `pattern guards + <https://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-460003.13>`__: :: + + case animal of + Fish { name=nm } + | "bob" <- nm -> "it's Bob!" + -- ^^^^^^^^^^^ a pattern guard + + This extension controls whether pattern guard syntax is allowed, + independent of language edition. diff --git a/docs/users_guide/exts/pattern_synonyms.rst b/docs/users_guide/exts/pattern_synonyms.rst index d52290e87b07..e36f64bafbd3 100644 --- a/docs/users_guide/exts/pattern_synonyms.rst +++ b/docs/users_guide/exts/pattern_synonyms.rst @@ -4,7 +4,7 @@ Pattern synonyms ================ .. extension:: PatternSynonyms - :shortdesc: Enable pattern synonyms. + :shortdesc: Allow definition of pattern synonyms. :since: 7.8.1 diff --git a/docs/users_guide/exts/poly_kinds.rst b/docs/users_guide/exts/poly_kinds.rst index 06b51d0e1a42..4c68ac890119 100644 --- a/docs/users_guide/exts/poly_kinds.rst +++ b/docs/users_guide/exts/poly_kinds.rst @@ -16,8 +16,7 @@ Kind polymorphism (and hence :extension:`KindSignatures`) and :extension:`DataKinds`. .. extension:: PolyKinds - :shortdesc: Enable kind polymorphism. - Implies :extension:`KindSignatures`. + :shortdesc: Allow kind polymorphism. :implies: :extension:`KindSignatures` :since: 7.4.1 @@ -251,7 +250,7 @@ Complete user-supplied kind signatures and polymorphic recursion ---------------------------------------------------------------- .. extension:: CUSKs - :shortdesc: Enable detection of complete user-supplied kind signatures. + :shortdesc: Detect complete user-supplied kind signatures. :since: 8.10.1 :status: Included in :extension:`Haskell98`, :extension:`Haskell2010` @@ -385,7 +384,7 @@ Standalone kind signatures and polymorphic recursion ---------------------------------------------------- .. extension:: StandaloneKindSignatures - :shortdesc: Allow the use of standalone kind signatures. + :shortdesc: Allow standalone kind signature declarations. :implies: :extension:`NoCUSKs` :since: 8.10.1 diff --git a/docs/users_guide/exts/primitives.rst b/docs/users_guide/exts/primitives.rst index b900234c4305..6ed5125410aa 100644 --- a/docs/users_guide/exts/primitives.rst +++ b/docs/users_guide/exts/primitives.rst @@ -147,7 +147,7 @@ Unboxed tuples -------------- .. extension:: UnboxedTuples - :shortdesc: Enable the use of unboxed tuple syntax. + :shortdesc: Allow the use of unboxed tuple syntax. :implies: :extension:`UnboxedSums` @@ -214,7 +214,7 @@ Unboxed sums ------------ .. extension:: UnboxedSums - :shortdesc: Enable unboxed sums. + :shortdesc: Allow the use of unboxed sum syntax. :implied by: :extension:`UnboxedTuples` :since: 8.2.1 @@ -315,7 +315,7 @@ Unlifted Newtypes ----------------- .. extension:: UnliftedNewtypes - :shortdesc: Enable unlifted newtypes. + :shortdesc: Allow definition of unlifted newtypes. :since: 8.10.1 @@ -388,7 +388,7 @@ Unlifted Datatypes ------------------ .. extension:: UnliftedDatatypes - :shortdesc: Enable unlifted data types. + :shortdesc: Allow the definition of unlifted data types. :implies: :extension:`DataKinds`, :extension:`StandaloneKindSignatures` :since: 9.2.1 diff --git a/docs/users_guide/exts/qualified_do.rst b/docs/users_guide/exts/qualified_do.rst index 050a5bfce61d..fb93c3260498 100644 --- a/docs/users_guide/exts/qualified_do.rst +++ b/docs/users_guide/exts/qualified_do.rst @@ -8,7 +8,7 @@ Qualified do-notation single: do-notation; Qualified .. extension:: QualifiedDo - :shortdesc: Enable qualified do-notation desugaring. + :shortdesc: Allow qualified ``do``-notation desugaring. :since: 9.0.1 diff --git a/docs/users_guide/exts/rank_polymorphism.rst b/docs/users_guide/exts/rank_polymorphism.rst index 1aaab408e3b1..1a87492f6f27 100644 --- a/docs/users_guide/exts/rank_polymorphism.rst +++ b/docs/users_guide/exts/rank_polymorphism.rst @@ -4,8 +4,7 @@ Arbitrary-rank polymorphism =========================== .. extension:: RankNTypes - :shortdesc: Enable rank-N types. - Implied by :extension:`ImpredicativeTypes`. + :shortdesc: Allow types of rank greater than one. :implies: :extension:`ExplicitForAll` :since: 6.8.1 @@ -15,7 +14,6 @@ Arbitrary-rank polymorphism .. extension:: Rank2Types :shortdesc: Enable rank-2 types. - Synonym for :extension:`RankNTypes`. :since: 6.8.1 :status: Deprecated @@ -212,7 +210,7 @@ A similar phenomenon occurs for operator sections. For example, expanding it to ``\x -> x \`g3a\` "hello"``. .. extension:: DeepSubsumption - :shortdesc: Enable deep subsumption + :shortdesc: Use GHC's deep subsumption checking. :since: 9.2.4 diff --git a/docs/users_guide/exts/rebindable_syntax.rst b/docs/users_guide/exts/rebindable_syntax.rst index 72445374ef85..d189ebd9a950 100644 --- a/docs/users_guide/exts/rebindable_syntax.rst +++ b/docs/users_guide/exts/rebindable_syntax.rst @@ -3,22 +3,20 @@ Rebindable syntax and the implicit Prelude import ------------------------------------------------- -.. extension:: NoImplicitPrelude - :shortdesc: Don't implicitly ``import Prelude``. - Implied by :extension:`RebindableSyntax`. +.. extension:: ImplicitPrelude + :shortdesc: Implicitly import ``Prelude``. - :implied by: :extension:`RebindableSyntax` + :implied by: :extension:`RebindableSyntax` implies :extension:`NoImplicitPrelude`. :since: 6.8.1 - Don't import ``Prelude`` by default. + Implicitly import the ``Prelude`` module by default. -GHC normally imports ``Prelude.hi`` files for +GHC normally imports the ``Prelude`` module for you. If you'd rather it didn't, then give it a ``-XNoImplicitPrelude`` option. The idea is that you can then import a Prelude of your own. .. extension:: RebindableSyntax - :shortdesc: Employ rebindable syntax. - Implies :extension:`NoImplicitPrelude`. + :shortdesc: Allow rebinding of builtin syntax. :implies: :extension:`NoImplicitPrelude` :since: 7.0.1 @@ -163,7 +161,7 @@ Postfix operators ----------------- .. extension:: PostfixOperators - :shortdesc: Enable postfix operators. + :shortdesc: Allow the use of postfix operators. :since: 7.10.1 :status: Included in :extension:`GHC2024`, :extension:`GHC2021` diff --git a/docs/users_guide/exts/record_puns.rst b/docs/users_guide/exts/record_puns.rst index 8682d8123867..b60d26f6861f 100644 --- a/docs/users_guide/exts/record_puns.rst +++ b/docs/users_guide/exts/record_puns.rst @@ -4,7 +4,7 @@ Record puns ----------- .. extension:: NamedFieldPuns - :shortdesc: Enable record puns. + :shortdesc: Allow record field punning syntax. :since: 6.10.1 diff --git a/docs/users_guide/exts/record_wildcards.rst b/docs/users_guide/exts/record_wildcards.rst index aff4cccf73d5..1b57b9f06a12 100644 --- a/docs/users_guide/exts/record_wildcards.rst +++ b/docs/users_guide/exts/record_wildcards.rst @@ -4,8 +4,7 @@ Record wildcards ---------------- .. extension:: RecordWildCards - :shortdesc: Enable record wildcards. - Implies :extension:`DisambiguateRecordFields`. + :shortdesc: Allow use of record wildcard syntax. :implies: :extension:`DisambiguateRecordFields`. :since: 6.8.1 diff --git a/docs/users_guide/exts/recursive_do.rst b/docs/users_guide/exts/recursive_do.rst index a67a4bb409c3..82b00e039133 100644 --- a/docs/users_guide/exts/recursive_do.rst +++ b/docs/users_guide/exts/recursive_do.rst @@ -4,7 +4,7 @@ The recursive do-notation ------------------------- .. extension:: RecursiveDo - :shortdesc: Enable recursive do (mdo) notation. + :shortdesc: Allow recursive do (e.g. ``mdo``) notation. :since: 6.8.1 diff --git a/docs/users_guide/exts/required_type_arguments.rst b/docs/users_guide/exts/required_type_arguments.rst index b75e7034c270..ceb51e720036 100644 --- a/docs/users_guide/exts/required_type_arguments.rst +++ b/docs/users_guide/exts/required_type_arguments.rst @@ -2,7 +2,7 @@ Required type arguments ======================= .. extension:: RequiredTypeArguments - :shortdesc: Enable required type arguments in terms. + :shortdesc: Allow use of required type argument syntax in terms. :since: 9.10.1 :status: Experimental @@ -405,4 +405,4 @@ coming from dependently-typed languages or proof assistants. 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. \ No newline at end of file +just makes it possible for the type arguments of a function to be compulsory. diff --git a/docs/users_guide/exts/roles.rst b/docs/users_guide/exts/roles.rst index 16cc84772fc4..ae4186d22763 100644 --- a/docs/users_guide/exts/roles.rst +++ b/docs/users_guide/exts/roles.rst @@ -148,7 +148,7 @@ Role annotations ---------------- .. extension:: RoleAnnotations - :shortdesc: Enable role annotations. + :shortdesc: Allow role annotation syntax. :since: 7.8.1 :status: Included in :extension:`GHC2024` diff --git a/docs/users_guide/exts/scoped_type_variables.rst b/docs/users_guide/exts/scoped_type_variables.rst index 8133e8f81c54..a12f74c0b740 100644 --- a/docs/users_guide/exts/scoped_type_variables.rst +++ b/docs/users_guide/exts/scoped_type_variables.rst @@ -6,7 +6,7 @@ Lexically scoped type variables =============================== .. extension:: ScopedTypeVariables - :shortdesc: Enable lexically-scoped type variables. + :shortdesc: Lexically scope explicitly-introduced type variables. :implies: :extension:`ExplicitForAll` diff --git a/docs/users_guide/exts/standalone_deriving.rst b/docs/users_guide/exts/standalone_deriving.rst index f9c06ee691a0..508cfc1ef8c9 100644 --- a/docs/users_guide/exts/standalone_deriving.rst +++ b/docs/users_guide/exts/standalone_deriving.rst @@ -4,7 +4,7 @@ Stand-alone deriving declarations --------------------------------- .. extension:: StandaloneDeriving - :shortdesc: Enable standalone deriving. + :shortdesc: Allow standalone instance deriving declarations. :since: 6.8.1 diff --git a/docs/users_guide/exts/static_pointers.rst b/docs/users_guide/exts/static_pointers.rst index d6f5e55a73e6..b4a4b1154078 100644 --- a/docs/users_guide/exts/static_pointers.rst +++ b/docs/users_guide/exts/static_pointers.rst @@ -7,7 +7,7 @@ Static pointers single: Static pointers .. extension:: StaticPointers - :shortdesc: Enable static pointers. + :shortdesc: Allow ``static`` syntax. :since: 7.10.1 diff --git a/docs/users_guide/exts/strict.rst b/docs/users_guide/exts/strict.rst index 17e1365092f8..0385779c32be 100644 --- a/docs/users_guide/exts/strict.rst +++ b/docs/users_guide/exts/strict.rst @@ -37,7 +37,7 @@ Bang patterns ------------- .. extension:: BangPatterns - :shortdesc: Enable bang patterns. + :shortdesc: Allow bang pattern syntax. :since: 6.8.1 @@ -158,7 +158,7 @@ Strict-by-default data types ---------------------------- .. extension:: StrictData - :shortdesc: Enable default strict datatype fields. + :shortdesc: Treat datatype fields as strict by default. :since: 8.0.1 diff --git a/docs/users_guide/exts/template_haskell.rst b/docs/users_guide/exts/template_haskell.rst index 56d022b439c5..b8153909990d 100644 --- a/docs/users_guide/exts/template_haskell.rst +++ b/docs/users_guide/exts/template_haskell.rst @@ -30,7 +30,7 @@ Syntax ------ .. extension:: TemplateHaskell - :shortdesc: Enable Template Haskell. + :shortdesc: Allow Template Haskell's splice and quotation syntax. :implies: :extension:`TemplateHaskellQuotes` :since: 6.0. Typed splices introduced in GHC 7.8.1. @@ -38,12 +38,11 @@ Syntax Enable Template Haskell's splice and quotation syntax. .. extension:: TemplateHaskellQuotes - :shortdesc: Enable quotation subset of - :ref:`Template Haskell <template-haskell>`. + :shortdesc: Allow :ref:`Template Haskell <template-haskell>`'s quotation syntax. :since: 8.0.1 - Enable only Template Haskell's quotation syntax. + Enable Template Haskell's quotation syntax. Template Haskell has the following new syntactic constructions. You need to use the extension :extension:`TemplateHaskell` to switch these syntactic extensions on. @@ -54,8 +53,8 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under - A splice is written ``$x``, where ``x`` is an arbitrary expression. There must be no space between the "$" and the expression. - This use of "$" overrides its meaning as an infix operator, just as "M.x" - overrides the meaning of "." as an infix operator. If you want the + This use of ``$`` overrides its meaning as an infix operator, just as ``M.x`` + overrides the meaning of ``.`` as an infix operator. If you want the infix operator, put spaces around it. A top-level splice can occur in place of @@ -693,7 +692,7 @@ Template Haskell Quasi-quotation -------------------------------- .. extension:: QuasiQuotes - :shortdesc: Enable quasiquotation. + :shortdesc: Allow quasiquotation syntax. :since: 6.10.1 diff --git a/docs/users_guide/exts/traditional_record_syntax.rst b/docs/users_guide/exts/traditional_record_syntax.rst index 842af8065255..468f5cb0e8df 100644 --- a/docs/users_guide/exts/traditional_record_syntax.rst +++ b/docs/users_guide/exts/traditional_record_syntax.rst @@ -3,13 +3,13 @@ Traditional record syntax ------------------------- -.. extension:: NoTraditionalRecordSyntax - :shortdesc: Disable support for traditional record syntax - (as supported by Haskell 98) ``C {f = x}`` +.. extension:: TraditionalRecordSyntax + :shortdesc: Allow traditional record syntax (e.g. ``C {f = x}``). :since: 7.4.1 + :status: Enabled by default. - Disallow use of record syntax. + Allow traditional record syntax (e.g. ``C {f = x}``). Traditional record syntax, such as ``C {f = x}``, is enabled by default. To disable it, you can use the :extension:`NoTraditionalRecordSyntax` extension. diff --git a/docs/users_guide/exts/tuple_sections.rst b/docs/users_guide/exts/tuple_sections.rst index 156816120de1..6063a982117f 100644 --- a/docs/users_guide/exts/tuple_sections.rst +++ b/docs/users_guide/exts/tuple_sections.rst @@ -4,7 +4,7 @@ Tuple sections -------------- .. extension:: TupleSections - :shortdesc: Enable tuple sections. + :shortdesc: Allow use of tuple section synxtax. :since: 6.12 diff --git a/docs/users_guide/exts/type_abstractions.rst b/docs/users_guide/exts/type_abstractions.rst index 925048e62b56..69f4cc43e7fe 100644 --- a/docs/users_guide/exts/type_abstractions.rst +++ b/docs/users_guide/exts/type_abstractions.rst @@ -2,7 +2,7 @@ Type abstractions ================= .. extension:: TypeAbstractions - :shortdesc: Enable type abstraction syntax in patterns and type variable binders. + :shortdesc: Allow type abstraction syntax in patterns and type variable binders. :since: 9.8.1 diff --git a/docs/users_guide/exts/type_applications.rst b/docs/users_guide/exts/type_applications.rst index cee3b8c2bf4f..3cc2f2c387fb 100644 --- a/docs/users_guide/exts/type_applications.rst +++ b/docs/users_guide/exts/type_applications.rst @@ -4,7 +4,7 @@ Visible type application ======================== .. extension:: TypeApplications - :shortdesc: Enable type application syntax in terms and types. + :shortdesc: Allow type application syntax in terms and types. :since: 8.0.1 @@ -261,4 +261,4 @@ of equality over types. For example, given the following definitions: :: app2 g x = g x GHC will deem all of ``app1 id1``, ``app1 id2``, ``app2 id1``, and ``app2 id2`` -to be well typed. \ No newline at end of file +to be well typed. diff --git a/docs/users_guide/exts/type_data.rst b/docs/users_guide/exts/type_data.rst index 0779b2327370..214c9118dd60 100644 --- a/docs/users_guide/exts/type_data.rst +++ b/docs/users_guide/exts/type_data.rst @@ -2,7 +2,7 @@ Type-level data declarations ============================ .. extension:: TypeData - :shortdesc: Enable type data declarations. + :shortdesc: Allow ``type data`` declarations. :since: 9.6.1 diff --git a/docs/users_guide/exts/type_families.rst b/docs/users_guide/exts/type_families.rst index 7f9ecaa7ea63..4a9636a2a3f6 100644 --- a/docs/users_guide/exts/type_families.rst +++ b/docs/users_guide/exts/type_families.rst @@ -4,9 +4,7 @@ Type families ============= .. extension:: TypeFamilies - :shortdesc: Enable type families. - Implies :extension:`ExplicitNamespaces`, :extension:`KindSignatures`, - and :extension:`MonoLocalBinds`. + :shortdesc: Allow definition of type families. :implies: :extension:`MonoLocalBinds`, :extension:`KindSignatures`, :extension:`ExplicitNamespaces` @@ -1126,8 +1124,7 @@ Injective type families ----------------------- .. extension:: TypeFamilyDependencies - :shortdesc: Enable injective type families. - Implies :extension:`TypeFamilies`. + :shortdesc: Allow injectivity annotations on type families. :implies: :extension:`TypeFamilies` diff --git a/docs/users_guide/exts/type_operators.rst b/docs/users_guide/exts/type_operators.rst index f3a6abdb02b9..3c4aa936da74 100644 --- a/docs/users_guide/exts/type_operators.rst +++ b/docs/users_guide/exts/type_operators.rst @@ -4,8 +4,7 @@ Type operators -------------- .. extension:: TypeOperators - :shortdesc: Enable type operators. - Implies :extension:`ExplicitNamespaces`. + :shortdesc: Allow type constructors to be given operator names. :implies: :extension:`ExplicitNamespaces` diff --git a/docs/users_guide/exts/view_patterns.rst b/docs/users_guide/exts/view_patterns.rst index 99705fec3294..e190241217e9 100644 --- a/docs/users_guide/exts/view_patterns.rst +++ b/docs/users_guide/exts/view_patterns.rst @@ -4,7 +4,7 @@ View patterns ------------- .. extension:: ViewPatterns - :shortdesc: Enable view patterns. + :shortdesc: Allow view pattern syntax. :since: 6.10.1 diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst index 7940767ce688..954916b1b2fe 100644 --- a/docs/users_guide/phases.rst +++ b/docs/users_guide/phases.rst @@ -287,7 +287,7 @@ Options affecting the C pre-processor ------------------------------------- .. extension:: CPP - :shortdesc: Enable the C preprocessor. + :shortdesc: Resolve C preprocessor directives. :since: 6.8.1 -- GitLab