Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Hidden class members still show up in instances #1162

@harpocrates

Description

@harpocrates

With haddock-ghc-8.10.1 (and tip of ghc-8.10 as of writing)

module ClassMember (Foo(a)) where

class Foo a where
  a :: a -> Int
  a x = b x

  b :: a -> Int
  b _ = 6

instance Foo Int where

produces

image

b has no business showing up in the instance! I expect this problem shows up for instance lists under data declarations. Although this example has an obviously correct case, it is not always clear what we should do. For instance: suppose a class is exported from two different locations with different methods visible, which do we show

  • under the first place it is re-exported
  • under the seconds place it is re-exported
  • under data types elsewhere which declare instances

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions