-
-
Notifications
You must be signed in to change notification settings - Fork 412
Closed
Labels
component: hls-explicit-record-fields-pluginIssues related to the hls-explicit-record-fields-pluginIssues related to the hls-explicit-record-fields-plugintype: enhancementNew feature or requestNew feature or request
Description
Is your enhancement request related to a problem? Please describe.
My codebase is full of pieces of record that are constructed using "function" syntax. Something such as:
data Foo = Foo {
count :: Int,
name :: String
}
boz = Foo 10 "hello"Describe the solution you'd like
I would like a code action available on Foo in boz which expand the syntax to record field syntax. Said otherwise, after usage, I would like:
boz = Foo 10 "hello"to become:
boz = Foo { count = 10, name = "hello" }Describe alternatives you've considered
Additional context
This can also be extended to other cases where record are used in "function" form, example for pattern matching:
biz (Foo a b) = ...Could be turned to:
biz (Foo {count = a, name = b}If you are interested and if the initial design is ok, I can give a try to the implementation.
fendor, georgefst and soulomoon
Metadata
Metadata
Assignees
Labels
component: hls-explicit-record-fields-pluginIssues related to the hls-explicit-record-fields-pluginIssues related to the hls-explicit-record-fields-plugintype: enhancementNew feature or requestNew feature or request