haskell / haskell/haskell-language-server

Inlay hints for deriving strategies

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

Description

## Is your enhancement request related to a problem? Please describe.

When you use deriving without deriving strategies, the choice of how the instance is derived is implicit. We could make this explicit with inlay hints.

## Describe the solution you'd like

```
data Foo ...
deriving stock (Eq, Ord)
```

The tricky bit will be if we have a list of derived classes which use different strategies! I would suggest something like:

```
data Foo ...
deriving stock,anyclass (Eq, ToJSON)
```

Triggering this would of course produce
```
data Foo ..
deriving stock Eq
deriving anyclass ToJSON
```

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.