-
Notifications
You must be signed in to change notification settings - Fork 236
Leading commas are not supported in the export list #1081
Leading commas are not supported in the export list #1081
Conversation
Nice catch. However, the example is only slightly off. The problem is only the very first comma - the rest can work: module Foo (
-- * Classes
C(..)
-- * Types
-- ** A data type
, T
-- ** A record
, R
-- * Some functions
, f
, g
) where Even better would be to patch the GHC parser to accept this leading comma; fix the compiler to match the docs, rather than the other way around. 😄 |
|
So now that the GHC proposal is accepted, am I to understand that the example you are removing should start working (as soon as the proposal is implemented)? |
Note: I noticed some overlap with haskell#1112 from @wygulmage and haskell#1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner.
Well, the docs are currently wrong, so we can fix them, and whenever someone implements the extra commas, this can be fixed up then. Or the docs can be wrong until some unspecified time in the future - after all, they've been wrong up until now 😄 |
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.
Fixed in 89ec565. |
I don't see how that commit addresses this. As far as I can tell, the offending section is still present. |
The very first offending comma has been removed: 89ec565#diff-897e80371095d1cf43491db53dae292cR516. the leading comma style is sufficiently widespread that I don't think we should remove this section outright. |
Thanks! I missed that 😄 |
* 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]>
* Fix multiple typos and inconsistencies in doc/markup.rst Note: I noticed some overlap with haskell/haddock#1112 from @wygulmage and haskell/haddock#1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner. * Fix haskell/haddock#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]>
I read this part of the docs, tried it out, and got a parse error. I don't think that GHC supports this syntax.