Show documentation attached to constructors of associated types
tdammers opened this issue · comments
Tobias Dammers commented
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.
Noah Luck Easterly commented
Adding insult to injury, you get warnings about the missing documentation for the constructors.