Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not find link destination for data family #1071

Open
guibou opened this issue Jul 1, 2019 · 3 comments
Open

could not find link destination for data family #1071

guibou opened this issue Jul 1, 2019 · 3 comments
Labels

Comments

@guibou
Copy link
Contributor

guibou commented Jul 1, 2019

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
Copy link
Collaborator

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

  • 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).
  • D:R:BarBiz0 is a mess to look at. I don't think we ever provide anchors to derived names... Perhaps the warning should start by filtering out names which satisfy isDerivedOccName?
  • Bar really should have a link destination. One day, when Better data family rendering #897 gets merged, there will be a reasonable place to place such anchors.

@harpocrates harpocrates added the bug label Jul 1, 2019
@guibou
Copy link
Contributor Author

guibou commented Jul 1, 2019

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
Copy link
Member

@guibou is this still reproducible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants