haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 241 forks source link

could not find link destination for data family #1071

Open guibou opened 5 years ago

guibou commented 5 years ago

The following code:

{-# LANGUAGE TypeFamilies #-}
module NewTypeExport where

class Foo t where
  data Bar t

data Biz

instance Foo Biz where
  data Bar Biz = Bar Biz

Generates the following warning:

Warning: NewTypeExport: could not find link destinations for:
    Type D:R:BarBiz0 Bar

When actually Bar Biz is visible, hence I don't understand the warning. That's similar to #1070, however I don't have any easy workaround for that one.

harpocrates commented 5 years ago

Haddock doesn't do a great job in general with data families and data instances. Some thoughts:

guibou commented 5 years ago

Type is something added by Haddock (since all instances are reified from GHC internals) so we should always be able to link to it (perhaps it needs to be manually added to the renaming environment).

My mistake for Type, I had not the -i ...../base.haddock list of flags.

Kleidukos commented 5 months ago

@guibou is this still reproducible?

jcmartin commented 3 months ago

I see this issue a great deal when dealing with Generics. Specifically, when I use GeneralizedNewtypeDeriving and derive a Generic, it complains that it cannot find the link destination for the associated type family Rep instance.

Kleidukos commented 3 months ago

Thanks for the confirmation. :)