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.

Type variables from instances and class functions are conflated #654

@endgame

Description

@endgame

GHC Version: 8.0.2
Haddock Version: 2.17.3
Minimal Example:

import Prelude hiding (Functor)

class Functor f where
    fmap :: (a -> b) -> f a -> f b

instance Functor (Either a) where
    fmap _ (Left x) = Left x
    fmap f (Right a) = Right $ f a

Expand the instance declaration for Either and note that it's conflated the a from the instance with the a from the type signature of fmap, which makes it look like a more restrictive type than it really is.

haddock

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