Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
3,987
Issues
3,987
List
Boards
Labels
Service Desk
Milestones
Merge Requests
326
Merge Requests
326
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
4cab6897
Commit
4cab6897
authored
Jun 15, 2020
by
Adam Sandberg Eriksson
🐈
Committed by
Marge Bot
Jun 17, 2020
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: fix formatting in users guide
parent
0639dc10
Pipeline
#21064
passed with stages
in 375 minutes and 38 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
20 deletions
+18
-20
docs/users_guide/8.12.1-notes.rst
docs/users_guide/8.12.1-notes.rst
+6
-7
docs/users_guide/extending_ghc.rst
docs/users_guide/extending_ghc.rst
+1
-1
docs/users_guide/exts/explicit_forall.rst
docs/users_guide/exts/explicit_forall.rst
+3
-3
docs/users_guide/exts/gadt_syntax.rst
docs/users_guide/exts/gadt_syntax.rst
+7
-7
docs/users_guide/using-warnings.rst
docs/users_guide/using-warnings.rst
+1
-2
No files found.
docs/users_guide/8.12.1-notes.rst
View file @
4cab6897
...
...
@@ -21,11 +21,10 @@ Highlights
* Pattern-Match Coverage Checking
- The revamp of the pattern-match coverage checker that started in 8.10 concludes with this release and implements the
- The revamp of the pattern-match coverage checker that started in 8.10 concludes with this release and implements the
novel `*Lower Your Guards* <https://www.microsoft.com/en-us/research/uploads/prod/2020/03/lyg.pdf>`_ algorithm.
- Compared to 8.10, end users might notice improvements to "long-distance information": ::
haskell
- Compared to 8.10, end users might notice improvements to "long-distance information": ::
:linenos:
f True = 1
f x = ... case x of { False -> 2; True -> 3 } ...
...
...
@@ -125,14 +124,14 @@ Language
MkT2 :: (forall a. a -> T)
``MkT1`` and ``MkT2`` are rejected because the lack of an outermost
``forall`` triggers implicit quantification, making the explicit ``forall``s
``forall`` triggers implicit quantification, making the explicit ``forall``
\
s
nested. Furthermore, GADT constructors do not permit the use of nested
``forall``s, as explained in :ref:`formal-gadt-syntax`.
``forall``
\
s, as explained in :ref:`formal-gadt-syntax`.
In addition to rejecting nested ``forall``s, GHC is now more stringent about
In addition to rejecting nested ``forall``
\
s, GHC is now more stringent about
rejecting uses of nested *contexts* in GADT constructors. For example, the
following example, which previous versions of GHC would accept, is now
rejected:
rejected:
::
data U a where
MkU :: (Show a => U a)
...
...
docs/users_guide/extending_ghc.rst
View file @
4cab6897
...
...
@@ -775,7 +775,7 @@ each case:
package/field-n
To read an interface file from an external tool without linking to GHC, the format
is described at `Extensible Interface Files<https://gitlab.haskell.org/ghc/ghc/wikis/Extensible-Interface-Files>`_.
is described at `Extensible Interface Files
<https://gitlab.haskell.org/ghc/ghc/wikis/Extensible-Interface-Files>`_.
Source plugin example
^^^^^^^^^^^^^^^^^^^^^
...
...
docs/users_guide/exts/explicit_forall.rst
View file @
4cab6897
...
...
@@ -112,9 +112,9 @@ Notes:
{-# RULES "f" forall (g :: forall a. a -> b) x. f g x = g x :: b #-}
- GADT constructors are extra particular about their ``forall``s. In addition
- GADT constructors are extra particular about their ``forall``
\
s. In addition
to adhering to the ``forall``-or-nothing rule, GADT constructors also forbid
nested ``forall``s. For example, GHC would reject the following GADT: ::
nested ``forall``
\
s. For example, GHC would reject the following GADT: ::
data T where
MkT :: (forall a. a -> b -> T)
...
...
@@ -122,4 +122,4 @@ Notes:
Because of the lack of an outermost ``forall`` in the type of ``MkT``, the
``b`` would be implicitly quantified. In effect, it would be as if one had
written ``MkT :: forall b. (forall a. a -> b -> T)``, which contains nested
``forall``s. See :ref:`formal-gadt-syntax`.
``forall``
\
s. See :ref:`formal-gadt-syntax`.
docs/users_guide/exts/gadt_syntax.rst
View file @
4cab6897
...
...
@@ -161,23 +161,23 @@ Where:
- ``btype`` is a type that is not allowed to have an outermost
``forall``/``=>`` unless it is surrounded by parentheses. For example,
``forall a. a`` and ``Eq a => a`` are not legal ``btype``s, but
``forall a. a`` and ``Eq a => a`` are not legal ``btype``
\
s, but
``(forall a. a)`` and ``(Eq a => a)`` are legal.
- ``ctype`` is a ``btype`` that has no restrictions on an outermost
``forall``/``=>``, so ``forall a. a`` and ``Eq a => a`` are legal ``ctype``s.
- ``return_type`` is a type that is not allowed to have ``forall``
s, ``=>``
s,
or ``->``s.
``forall``/``=>``, so ``forall a. a`` and ``Eq a => a`` are legal ``ctype``
\
s.
- ``return_type`` is a type that is not allowed to have ``forall``
\ s, ``=>``\
s,
or ``->``
\
s.
This is a simplified grammar that does not fully delve into all of the
implementation details of GHC's parser (such as the placement of Haddock
comments), but it is sufficient to attain an understanding of what is
syntactically allowed. Some further various observations about this grammar:
- GADT constructor types are currently not permitted to have nested ``forall``s
or ``=>``s. (e.g., something like ``MkT :: Int -> forall a. a -> T`` would be
- GADT constructor types are currently not permitted to have nested ``forall``
\
s
or ``=>``
\
s. (e.g., something like ``MkT :: Int -> forall a. a -> T`` would be
rejected.) As a result, ``gadt_sig`` puts all of its quantification and
constraints up front with ``opt_forall`` and ``opt_context``. Note that
higher-rank ``forall``
s and ``=>``
s are only permitted if they do not appear
higher-rank ``forall``
\ s and ``=>``\
s are only permitted if they do not appear
directly to the right of a function arrow in a `prefix_gadt_body`. (e.g.,
something like ``MkS :: Int -> (forall a. a) -> S`` is allowed, since
parentheses separate the ``forall`` from the ``->``.)
...
...
docs/users_guide/using-warnings.rst
View file @
4cab6897
...
...
@@ -239,8 +239,7 @@ of ``-W(no-)*``.
- ``Data.List`` due to the future addition of ``Data.List.singleton`` and
specialisation of exports to the ``[]`` type. See the
:ref:`mailing list
<https://groups.google.com/forum/#!topic/haskell-core-libraries/q3zHLmzBa5E>`
`mailing list <https://groups.google.com/forum/#!topic/haskell-core-libraries/q3zHLmzBa5E>`_
for details.
This warning can be addressed by either adding an explicit import list or
...
...
Marge Bot
💬
@marge-bot
mentioned in merge request
!3532 (closed)
·
Jun 17, 2020
mentioned in merge request
!3532 (closed)
mentioned in merge request !3532
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment