Ghcide: Record quick fixes based on fields should be deduped

Created on 23 Feb 2020  Â·  3Comments  Â·  Source: haskell/ghcide

image

Not sure what version of ghcide I'm on...

help wanted bug

All 3 comments

Reproduced with lastest hls and ghcide (although i got only 2 duplicates)
It suggests one for each record field (my record has only two), in the problems pane:

Illegal use of punning for field ‘a’
Use NamedFieldPuns to permit this

Illegal use of punning for field ‘b’
Use NamedFieldPuns to permit this

I can take a look at this issue. Any good place to start?

@gdevanla I think the code that trigger extension completion will be:

https://github.com/haskell/ghcide/blob/863392b9b94777a069a2a31e9b909d1ce45e93d4/src/Development/IDE/Plugin/CodeAction.hs#L526

Not known much about it though, it comes from the time where this was part of daml, according to blame.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anka-213 picture anka-213  Â·  5Comments

fendor picture fendor  Â·  7Comments

meditans picture meditans  Â·  6Comments

decapo01 picture decapo01  Â·  4Comments

istathar picture istathar  Â·  8Comments