Closed
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