Skip to content

add C to the context code action doesn't appear for instances #1855

Open
@isovector

Description

@isovector

Consider the following:

class Yo f where
    yo :: f x -> Int

go :: M1 i c f x -> Int
go (M1 fx) = yo fx

This gives me an underline on the call to yo, complaining that there is no instance Yo f. It comes with a code action to insert it into the type.

Now consider the analogous:

class Yo f where
    yo :: f x -> Int

instance Yo (M1 _1 _2 f) where
  yo (M1 fx) = yo fx

Same diagnostic, but this time there is no code action to fix the issue!

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: ghcidelevel: easyThe issue is suited for beginnerstype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..type: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions