summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/glasgow_exts.rst18
1 files changed, 11 insertions, 7 deletions
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 0ef0d053af..b1e9bc6722 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -10686,7 +10686,7 @@ Visible type application
========================
.. extension:: TypeApplications
- :shortdesc: Enable type application syntax.
+ :shortdesc: Enable type application syntax in terms and types.
:since: 8.0.1
@@ -10707,6 +10707,10 @@ is an identifier (the common case), its type is considered known only when
the identifier has been given a type signature. If the identifier does
not have a type signature, visible type application cannot be used.
+GHC also permits visible kind application, where users can declare the kind
+arguments to be instantiated in kind-polymorphic cases. Its usage parallels
+visible type application in the term level, as specified above.
+
.. _inferred-vs-specified:
Inferred vs. specified type variables
@@ -10864,8 +10868,8 @@ the rules in the subtler cases:
application. If you want to specify only the second type argument to
``wurble``, then you can say ``wurble @_ @Int``.
The first argument is a wildcard, just like in a partial type signature.
- However, if used in a visible type application, it is *not*
- necessary to specify :extension:`PartialTypeSignatures` and your
+ However, if used in a visible type application/visible kind application,
+ it is *not* necessary to specify :extension:`PartialTypeSignatures` and your
code will not generate a warning informing you of the omitted type.
The section in this manual on kind polymorphism describes how variables
@@ -12251,10 +12255,10 @@ Anonymous and named wildcards *can* occur on the left hand side of a
type or data instance declaration;
see :ref:`type-wildcards-lhs`.
-Anonymous wildcards are also allowed in visible type applications
-(:ref:`visible-type-application`). If you want to specify only the second type
-argument to ``wurble``, then you can say ``wurble @_ @Int`` where the first
-argument is a wildcard.
+Anonymous wildcards are also allowed in visible type applications/ visible kind
+applications (:ref:`visible-type-application`). If you want to specify only the
+second type argument to ``wurble``, then you can say ``wurble @_ @Int`` where
+the first argument is a wildcard.
Standalone ``deriving`` declarations permit the use of a single,
extra-constraints wildcard, like so: ::