haddock icon indicating copy to clipboard operation
haddock copied to clipboard

Haddock doesn't show `type instance`s as orphans

Open silky opened this issue 3 years ago • 0 comments

It would be really nice if, when I have orphan type instance ... statements, they would show up in the documentation of the file where I'm defining them.

Compare:

-- A.hs
{-# language TypeFamilies #-}

module A where

-- | Some witty observations about the type family.
type family B a :: *

-- | Some insightful observations about this bool instance.
type instance B Bool = Int

image

vs.

--- A.hs
{-# language TypeFamilies #-}

module A where

import B

-- | Some insightful observations about this bool instance.
type instance B Bool = Int
-- B.hs
{-# language TypeFamilies #-}

module B where

-- | Some witty observations about the type family.
type family B a :: *

Now:

image

image

:(

I'd love to see the instance for 'B' defined in the 'A' module. Is there a way to achieve this?

silky avatar Jul 15 '22 13:07 silky