haskell / haskell/haskell-language-server

Feature Request: Automatic Expansion of uninitialized record fields

未关闭
#462 19 条评论 3 个 reaction 已指派 1 人 已被 @dan-blank 认领 在 GitHub 查看
component: ghcide Hackathon level: easy type: enhancement
主要语言
Haskell
星标
3k
派生
455
平均合并
2 天 19 小时
30 天内合并 PR
11

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。