-
-
Notifications
You must be signed in to change notification settings - Fork 399
Closed
Labels
component: hls-rename-plugintype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Description
The environment doesn't matter here: just a plugin bug...
Steps to reproduce
Rename the following field
to something else using the rename plugin
{-# LANGUAGE NamedFieldPuns #-}
newtype Foo = Foo { field :: Int }
unFoo :: Foo -> Int
unFoo Foo{field} = field
Expected behaviour
I think the best UX should be that renames compose with bindings incurred by NamedFieldPuns
Actual behaviour
The output is instead:
{-# LANGUAGE NamedFieldPuns #-}
newtype Foo = Foo { bleh :: Int }
unFoo :: Foo -> Int
unFoo Foo{bleh} = field
i.e. the field reference in the binding site is renamed, but not the subsequent reference on the RHS of unFoo
OliverMadine
Metadata
Metadata
Assignees
Labels
component: hls-rename-plugintype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..