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.

haddock "leaks" the names of non exported type class methods in minimal complete definitions #330

Open
@redneb

Description

@redneb

I have a situation where a module defines a type class and it only exports the class but none of its methods. Despite that, haddock mentions the names of the non exported methods of the class as part of the minimal complete definition.
Here's an example:

module Foo (MyClass) where

class MyClass a where
    method1 :: a -> Int
    method2 :: a -> Int

    method2 = method1

Now, if I run haddock --hyperlink-source I get the following warning:

Warning: Foo: could not find link destinations for:
    Foo.method1

and the generated html documentation looks like that:

class MyClass a 
    Minimal complete definition
    method1

The name of the private method is also leaked in the hoogle documention.

I've tried this with haddock-2.15.0 under ghc-7.8.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions