haskell / haskell/haskell-language-server

Typeclass constraint insert suggestions should not be fully-qualified as the syntax is not valid.

Open
#4,810 6 comments 0 reactions 0 assignees View on GitHub
Hackathon type: bug
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
4d 3h
Merged PRs (30d)
12

Description

Hi! When suggesting the addition of a missing typeclass constraint in a function signature, which has not yet been brought into scope, HLS will suggest its fully-qualified name (`Module.Module.Class m`), which is not valid syntax in the absence of a corresponding import line, which 1) is not handled automatically by HLS, and 2) not desired, as fully-qualified constraints are noisy and hamper legibility.

I would suggest to trim the name of the constraint, and let the import plugin sort out its provenance, or better, leave the user decide how it should be qualified. But inserting a fully-qualified name which then has to be edited is not a smooth experience.

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.