haskell / haskell/haskell-language-server

Class plugin type lenses show unnecessary constraints

Open
#3,240 4 comments 0 reactions 0 assignees View on GitHub
component: hls-class-plugin type: bug
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
4d 3h
Merged PRs (30d)
12

Description

On 1.8.0

The lenses for the class plugin show type signatures that include any context from the class itself, e.g.

![image](https://user-images.githubusercontent.com/1699466/193567905-4c84aa51-8ea1-4024-9ce3-71d0b591fb76.png)

(those constraints appear on the class). This is unnecessary: you can delete the constraints and the signature works because they're implied.

This is I think a similar problem to what we had here https://github.com/haskell/haskell-language-server/pull/2966#discussion_r901413885

I'm not totally sure what to do. Maybe we can ask the GHC devs if there's a way to get the right answer here. Maybe we can just remember the constraints that are in scope and try and get rid of them?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.