Skip to content

Haddock comments on infix constructors (#24221)

Vladislav Zavialov requested to merge wip/int-index/haddock-t24221 into master

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.

Edited by Vladislav Zavialov

Merge request reports