haskell / haskell/haskell-language-server

Feature Request: Automatic Expansion of uninitialized record fields

Ouverte
#462 19 commentaires 3 réactions 1 personne assignée Réclamée par @dan-blank Voir sur GitHub
component: ghcide Hackathon level: easy type: enhancement
Langage dominant
Haskell
Étoiles
3k
Forks
455
Merge moyen
2 j 19 h
PR mergées (30 j)
11

Description

When a warning for "Fields of ‘SomeRecord’ not initialised: a, b, c, d" fires, I'd like a `CodeAction` that allows it to initialize all of those rows with typed holes.

Flow would look like this:
1. let thing = SomeRecord{}
2. Ctrl+'.' (or other code action trigger)
3. ~~let thing = SomeRecord{}~~ --> let thing = SomeRecord { a = _, b = _, c = _, d = _ }

The reason that this is somewhat of a big deal is that in the presence of long record names with the conventional prefix based row names (someRecordA, someRecordB, ...), the typing for this is nontrivial and also entirely mechanical and so the editor is perfectly capable of doing this for me.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.