You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
Add dangling changes from branches ghc-8.6 and ghc-8.8 (#1243)
* Fix multiple typos and inconsistencies in doc/markup.rst
Note: I noticed some overlap with #1112 from @wygulmage and #1081 from
@parsonsmatt after creating these proposed changes - mea culpa for not
looking at the open PRs sooner.
* Fix#1113 If no Signatures, no section of index.html
* Change the formatting of missing link destinations
The current formatting of the missing link destination does not really
help user to understand the reasons of the missing link.
To address this, I've changed the formatting in two ways:
- the missing link symbol name is now fully qualified. This way you
immediately know which haskell module cannot be linked. It is then easier
to understand why this module does not have documentation (hidden module
or broken documentation).
- one line per missing link, that's more readable now that symbol name
can be longer due to qualification.
For example, before haddock was listing missing symbol such as:
```
could not find link destinations for:
Word8 Word16 mapMaybe
```
Now it is listed as:
```
could not find link destinations for:
- Data.Word.Word8
- Data.Word.Word16
- Data.Maybe.mapMaybe
```
* Add `--ignore-link-symbol` command line argument
This argument can be used multiples time. A missing link to a symbol
listed by `--ignore-link-symbol` won't trigger "missing link" warning.
* Forbid spaces in anchors (#1148)
* Improve error messages with context information (#1060)
Co-authored-by: Matt Audesse <[email protected]>
Co-authored-by: Mike Pilgrem <[email protected]>
Co-authored-by: Guillaume Bouchard <[email protected]>
Co-authored-by: Pepe Iborra <[email protected]>
We now give several examples that produce similar results and
354
354
illustrate most of the structural markup features. The first two
355
-
example use an export list, but the third example does not.
355
+
examples use an export list, but the third example does not.
356
356
357
357
The first example, using an export list with :ref:`section-headings`
358
358
and inline section descriptions: ::
@@ -362,7 +362,7 @@ and inline section descriptions: ::
362
362
--
363
363
-- | There is a "smart" importer, 'readImage', that determines
364
364
-- the image format from the file extension, and several
365
-
-- "dumb" format-specific importers that decode the file at
365
+
-- "dumb" format-specific importers that decode the file as
366
366
-- the specified type.
367
367
readImage
368
368
, readPngImage
@@ -417,7 +417,7 @@ defined elsewhere (the ``$imageImporters``; see :ref:`named-chunks`):
417
417
--
418
418
-- There is a "smart" importer, 'readImage', that determines the
419
419
-- image format from the file extension, and several "dumb"
420
-
-- format-specific importers that decode the file at the specified
420
+
-- format-specific importers that decode the file as the specified
421
421
-- type.
422
422
423
423
-- | Read an image, guessing the format from the file name.
@@ -450,7 +450,7 @@ The third example, without an export list: ::
450
450
--
451
451
-- There is a "smart" importer, 'readImage', that determines the
452
452
-- image format from the file extension, and several "dumb"
453
-
-- format-specific importers that decode the file at the specified
453
+
-- format-specific importers that decode the file as the specified
454
454
-- type.
455
455
456
456
-- | Read an image, guessing the format from the file name.
@@ -522,11 +522,11 @@ create stable links, you can add an explicit anchor (see
522
522
This will create an HTML anchor ``#g:classes`` to the section.
523
523
524
524
The alternative style of placing the commas at the beginning of each
525
-
line is also supported. e.g.: ::
525
+
line is also supported, e.g.: ::
526
526
527
527
module Foo (
528
528
-- * Classes
529
-
, C(..)
529
+
C(..)
530
530
-- * Types
531
531
-- ** A data type
532
532
, T
@@ -539,7 +539,7 @@ line is also supported. e.g.: ::
539
539
540
540
When not using an export list, you may insert section headers in the
541
541
module body. Such section headers associate with all entities
542
-
declaried up until the next section header. For example: ::
542
+
declared up until the next section header. For example: ::
543
543
544
544
module Foo where
545
545
@@ -614,7 +614,7 @@ re-exporting module.
614
614
It is often desirable to include a chunk of documentation which is not
615
615
attached to any particular Haskell declaration, for example, when
616
616
giving summary documentation for a group of related definitions (see
617
-
:ref:`structure-examples`). In addition to including such documenation
617
+
:ref:`structure-examples`). In addition to including such documentation
618
618
chunks at the top of the file, as part of the
619
619
:ref:`module-description`, you can also associate them with
620
620
:ref:`section-headings`.
@@ -668,14 +668,14 @@ headings, depending on whether you are using an export list or not:
668
668
-- Here is a large chunk of documentation which may be referred to by
669
669
-- the name $doc.
670
670
671
-
Just like with entity declariations when not using an export list,
671
+
Just like with entity declarations when not using an export list,
672
672
named chunks of documentation are associated with the preceding
673
673
section header here, or with the implicit top-level documentation
674
674
section if there is no preceding section header.
675
675
676
676
**Warning**: the form used in the first bullet above, where the
677
677
chunk is not named, *does not work* when you aren't using an
678
-
export list. For example ::
678
+
export list. For example: ::
679
679
680
680
module Foo where
681
681
@@ -686,7 +686,7 @@ headings, depending on whether you are using an export list or not:
686
686
-- | The fooifier.
687
687
foo :: ...
688
688
689
-
will result in ``Some documentation not ...`` being attached to
689
+
will result in ``Some documentation not ...`` being attached to the
690
690
*next* entity declaration, here ``foo``, in addition to any other
691
691
documentation that next entity already has!
692
692
@@ -756,7 +756,7 @@ type in ``C`` will therefore point locally to ``C.T``.
756
756
Module Attributes
757
757
-----------------
758
758
759
-
Certain attributes may be specified for each module which affects the
759
+
Certain attributes may be specified for each module which affect the
760
760
way that Haddock generates documentation for that module. Attributes are
761
761
specified in a comma-separated list in an
762
762
``{-# OPTIONS_HADDOCK ... #-}`` pragma at the top of the module, either
@@ -807,7 +807,7 @@ Markup
807
807
808
808
Haddock understands certain textual cues inside documentation
809
809
annotations that tell it how to render the documentation. The cues (or
810
-
“markup”) have been designed to be simple and mnemonic in ASCII so that
810
+
“markup”) have been designed to be simple and mnemonic in ASCII so
811
811
the programmer doesn't have to deal with heavyweight annotations when
812
812
editing documentation comments.
813
813
@@ -820,8 +820,8 @@ comment.
820
820
Special Characters
821
821
~~~~~~~~~~~~~~~~~~
822
822
823
-
The following characters have special meanings in documentation
824
-
comments: ``\``, ``/``, ``'``, `````, ``"``, ``@``, ``<``, ``$``, ``#``. To insert a
823
+
The following characters have special meanings in documentation comments:
824
+
``\``, ``/``, ``'``, `````, ``"``, ``@``, ``<``, ``$``, ``#``. To insert a
825
825
literal occurrence of one of these special characters, precede it with a
826
826
backslash (``\``).
827
827
@@ -839,7 +839,7 @@ Character References
839
839
840
840
Although Haskell source files may contain any character from the Unicode
841
841
character set, the encoding of these characters as bytes varies between
842
-
systems, so that only source files restricted to the ASCII character set
842
+
systems. Consequently, only source files restricted to the ASCII character set
843
843
are portable. Other characters may be specified in character and string
844
844
literals using Haskell character escapes. To represent such characters
845
845
in documentation comments, Haddock supports SGML-style numeric character
@@ -926,10 +926,11 @@ If ``M.T`` is not otherwise in scope, then Haddock will simply emit a
926
926
link pointing to the entity ``T`` exported from module ``M`` (without
927
927
checking to see whether either ``M`` or ``M.T`` exist).
928
928
929
-
Since values and types live in different namespaces in Haskell, it is
930
-
possible for a reference such as ``'X'`` to be ambiguous. In such a case,
931
-
Haddock defaults to pointing to the type. The ambiguity can be overcome by explicitly specifying a namespace, by way of a ``v`` (for value) or ``t``
932
-
(for type) immediately before the link: ::
929
+
Since values and types live in different namespaces in Haskell, it is possible
930
+
for a reference such as ``'X'`` to be ambiguous. In such a case, Haddock
931
+
defaults to pointing to the type. The ambiguity can be overcome by explicitly
932
+
specifying a namespace, by way of a ``v`` (for value) or ``t`` (for type)
933
+
immediately before the link: ::
933
934
934
935
-- | An implicit reference to 'X', the type constructor
935
936
-- An explicit reference to v'X', the data constructor
@@ -986,7 +987,7 @@ Itemized and Enumerated Lists
986
987
987
988
A bulleted item is represented by preceding a paragraph with either
988
989
“``*``” or “``-``”. A sequence of bulleted paragraphs is rendered as an
989
-
itemized list in the generated documentation, eg.: ::
990
+
itemized list in the generated documentation, e.g.: ::
990
991
991
992
-- | This is a bulleted list:
992
993
--
@@ -1025,7 +1026,7 @@ You can have more than one line of content in a list element: ::
1025
1026
1026
1027
You can even nest whole paragraphs inside of list elements. The rules
1027
1028
are 4 spaces for each indentation level. You're required to use a
1028
-
newline before such nested paragraph: ::
1029
+
newline before such nested paragraphs: ::
1029
1030
1030
1031
{-|
1031
1032
* Beginning of list
@@ -1112,7 +1113,7 @@ followed by the URL enclosed in regular parentheses, for example: ::
1112
1113
1113
1114
[some link](http://example.com)
1114
1115
1115
-
The link text is used as a descriptive text for the URL, if the output
1116
+
The link text is used as a description for the URL if the output
1116
1117
format supports it.
1117
1118
1118
1119
Images
@@ -1125,8 +1126,8 @@ like this: ::
1125
1126

1126
1127
1127
1128
If the output format supports it, the image will be rendered inside the
1128
-
documentation. The image description is used as relpacement text and/or
1129
-
image title.
1129
+
documentation. The image description is used as replacement text and/or
1130
+
an image title.
1130
1131
1131
1132
Mathematics / LaTeX
1132
1133
~~~~~~~~~~~~~~~~~~~
@@ -1146,7 +1147,13 @@ the mathematics via `MathJax <https://www.mathjax.org>`__.
1146
1147
Grid Tables
1147
1148
~~~~~~~~~~~
1148
1149
1149
-
Inspired by reSTs grid tables Haddock supports a complete table representation via a grid-like "ASCII art". Grid tables are described with a visual grid made up of the characters "-", "=", "|", and "+". The hyphen ("-") is used for horizontal lines (row separators). The equals sign ("=") may be used to separate optional header rows from the table body. The vertical bar ("|") is used for vertical lines (column separators). The plus sign ("+") is used for intersections of horizontal and vertical lines. ::
1150
+
Inspired by reSTs grid tables, Haddock supports a complete table representation
1151
+
via grid-like "ASCII art". Grid tables are described with a visual grid made
1152
+
up of the characters "-", "=", "|", and "+". The hyphen ("-") is used for
1153
+
horizontal lines (row separators). The equals sign ("=") may be used to
1154
+
separate optional header rows from the table body. The vertical bar ("|") is
1155
+
used for vertical lines (column separators). The plus sign ("+") is used for
1156
+
intersections of horizontal and vertical lines. ::
1150
1157
1151
1158
-- | This is a grid table:
1152
1159
--
@@ -1240,7 +1247,7 @@ Since
1240
1247
^^^^^
1241
1248
1242
1249
``@since`` annotation can be used to convey information about when the
1243
-
function was introduced or when it has changed in the way significant to
1250
+
function was introduced or when it has changed in a way significant to
1244
1251
the user. ``@since`` is a paragraph-level element. While multiple such
1245
1252
annotations are not an error, only the one to appear in the comment last
1246
1253
will be used. ``@since`` has to be followed with a version number, no
0 commit comments