Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

Empty Haddock comments no longer occur in the AST as `HsDoc`
## Summary Consider the following two type signatures. ```haskell foo :: {- |-} A -> B bar :: {- | -} A -> B ``` Comparing the AST (with `-haddock`) of `foo` and `bar`, note that `foo` does not contain a `HsDoc` (searchf or `WithHsDocIdentifiers`), but `bar` does: <table> <tr><th> `foo`</th><th> `bar`</th></tr> <tr> <td> ```haskell (L (SrcSpanAnn (EpAnn (Anchor { <interactive>:1:1-20 } (UnchangedAnchor)) (AnnListItem []) (EpaComments [])) { <interactive>:1:1-20 }) (SigD (NoExtField) (TypeSig (EpAnn (Anchor { <interactive>:1:1-3 } (UnchangedAnchor)) (AnnSig (AddEpAnn AnnDcolon (EpaSpan { <interactive>:1:5-6 })) []) (EpaComments [])) [(L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:1-3 }) (Unqual {OccName: foo}))] (HsWC (NoExtField) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:15-20 }) (HsSig (NoExtField) (HsOuterImplicit (NoExtField)) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:15-20 }) (HsFunTy (EpAnn (Anchor { <interactive>:1:15 } (UnchangedAnchor)) (NoEpAnns) (EpaComments [])) (HsUnrestrictedArrow (L (TokenLoc (EpaSpan { <interactive>:1:17-18 })) (HsNormalTok))) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:15 }) (HsTyVar (EpAnn (Anchor { <interactive>:1:15 } (UnchangedAnchor)) [] (EpaComments [])) (NotPromoted) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:15 }) (Unqual {OccName: A})))) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:20 }) (HsTyVar (EpAnn (Anchor { <interactive>:1:20 } (UnchangedAnchor)) [] (EpaComments [])) (NotPromoted) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:20 }) (Unqual {OccName: B})))))))))))) ``` </td> <td> ```haskell (L (SrcSpanAnn (EpAnn (Anchor { <interactive>:1:1-21 } (UnchangedAnchor)) (AnnListItem []) (EpaComments [])) { <interactive>:1:1-21 }) (SigD (NoExtField) (TypeSig (EpAnn (Anchor { <interactive>:1:1-3 } (UnchangedAnchor)) (AnnSig (AddEpAnn AnnDcolon (EpaSpan { <interactive>:1:5-6 })) []) (EpaComments [])) [(L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:1-3 }) (Unqual {OccName: bar}))] (HsWC (NoExtField) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:16-21 }) (HsSig (NoExtField) (HsOuterImplicit (NoExtField)) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:16-21 }) (HsFunTy (EpAnn (Anchor { <interactive>:1:16 } (UnchangedAnchor)) (NoEpAnns) (EpaComments [])) (HsUnrestrictedArrow (L (TokenLoc (EpaSpan { <interactive>:1:18-19 })) (HsNormalTok))) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:16 }) (HsDocTy (EpAnnNotUsed) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:16 }) (HsTyVar (EpAnn (Anchor { <interactive>:1:16 } (UnchangedAnchor)) [] (EpaComments [])) (NotPromoted) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:16 }) (Unqual {OccName: A})))) (L { <interactive>:1:8-14 } (WithHsDocIdentifiers (NestedDocString (HsDocStringNext) (L { <interactive>:1:8-14 } (HsDocStringChunk " "))) [])))) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:21 }) (HsTyVar (EpAnn (Anchor { <interactive>:1:21 } (UnchangedAnchor)) [] (EpaComments [])) (NotPromoted) (L (SrcSpanAnn (EpAnnNotUsed) { <interactive>:1:21 }) (Unqual {OccName: B})))))))))))) ``` </td> </tr> </table> Is there a particular reason for this? In GHC 8.10, the AST contained Haddock comments in both cases. Concrete effects of this behavior: - It makes the job of formatters like Ormolu (see issues [1068](https://github.com/tweag/ormolu/pull/1068), [1065](https://github.com/tweag/ormolu/issues/1065), [726](https://github.com/tweag/ormolu/issues/726)) that check of AST discrepancies automatically harder than necessary, as eg a natural rewrite from ```haskell foo :: -- | -- A -> B ``` to ```haskell foo :: -- | A -> B ``` contains a Haddock comment in the AST in the first snippet, but not in the second. - A nice Haddock trick by @tomjaguarpaw1 ([blog post](http://h2.jaguarpaw.co.uk/posts/improving-the-typed-process-documentation/), search for "Forced type signatures to wrap") does [no longer work](https://github.com/tweag/ormolu/pull/1068#issuecomment-1707237587). Ideally, the behavior would be changed as it was in 8.10; I could try to do that in case this behavior is not intentional. ## Environment * GHC version used: Any GHC since 9.0 (I think this change is due to !2377)
issue