haskell / haskell/haskell-language-server
`add C to the context` code action doesn't appear for instances
Open
component: ghcide
level: easy
type: bug
type: enhancement
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 11
Description
Consider the following:
```haskell
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:
```haskell
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!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.