Haddock comments on infix constructors (#24221)
Rewrite the `HasHaddock` instance for `ConDecl GhcPs` to account for infix constructors. This change fixes a Haddock regression (introduced in 19e80b9a) that affected leading comments on infix data constructor declarations: -- | Docs for infix constructor | Int :* Bool The comment should be associated with the data constructor (:*), not with its left-hand side Int.
Showing
- compiler/GHC/Parser/PostProcess/Haddock.hs 152 additions, 189 deletionscompiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Utils/Misc.hs 0 additions, 7 deletionscompiler/GHC/Utils/Misc.hs
- testsuite/tests/haddock/should_compile_flag_haddock/T24221.hs 43 additions, 0 deletions...suite/tests/haddock/should_compile_flag_haddock/T24221.hs
- testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr 1466 additions, 0 deletions...e/tests/haddock/should_compile_flag_haddock/T24221.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/all.T 1 addition, 0 deletionstestsuite/tests/haddock/should_compile_flag_haddock/all.T
Loading
Please register or sign in to comment