Show documentation attached to constructors of associated types
It looks like Haddock does not see documentation attached to constructors of associated type instances, whereas it does see documentation attached to constructors of regular types.
Example:
{-# LANGUAGE TypeFamilies #-}
class Foo a where data DF a
instance Foo Int where
newtype DF Int =
-- | Make DF
MkDF Int
newtype Ty =
-- | Make Ty
MkTy Int
*Main> :doc MkTy
MkTy :: Int -> Ty -- Data constructor defined at DF.hs:10:5
-- | Make Ty
*Main> :doc MkDF
<has no documentation>
I would expect :doc MkDF to cough up the line -- | Make DF, but this is not the case.
Trying to extract the documentation via Template Haskell's getDoc function gives similar results: the documentation attached to MkTy can be found just fine, but getDoc 'MkDF comes back empty.
Adding insult to injury, you get warnings about the missing documentation for the constructors.
Hi, thank you for this ticket, but Haddock now lives full-time in the GHC repository! Read more at https://discourse.haskell.org/t/haddock-now-lives-in-the-ghc-repository/9576.
Let me know if you feel it is still needed, and I'll migrate it. :)