-
-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renaming of indirect references (RecordFieldPuns) (#3013)
* test: add tests for record puns * feat: rename indirect references refactor: remove "safe" from function names * test: ignore record field tests for ghc92 (#2915) * test: ignore record field tests for ghc90 (#2915) * fix: update record field test ignore message * expand comment about indirect reference renaming * fix: find all punned references * test: ignore record field pun test for ghc > 9 * docs: mention test in indirect pun explaination * link issue for ignored record field rename tests Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ffefe76
commit 0f6cd41
Showing
7 changed files
with
92 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
plugins/hls-rename-plugin/test/testdata/FieldPuns.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{-# LANGUAGE NamedFieldPuns #-} | ||
|
||
module FieldPun () where | ||
|
||
newtype Foo = Foo { bleh :: Int } | ||
|
||
unFoo :: Foo -> Int | ||
unFoo Foo{bleh} = bleh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{-# LANGUAGE NamedFieldPuns #-} | ||
|
||
module FieldPun () where | ||
|
||
newtype Foo = Foo { field :: Int } | ||
|
||
unFoo :: Foo -> Int | ||
unFoo Foo{field} = field |
8 changes: 8 additions & 0 deletions
8
plugins/hls-rename-plugin/test/testdata/IndirectPuns.expected.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{-# LANGUAGE NamedFieldPuns #-} | ||
|
||
module IndirectPuns () where | ||
|
||
newtype Foo = Foo { blah :: Int } | ||
|
||
unFoo :: Foo -> Int | ||
unFoo Foo{blah} = blah |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{-# LANGUAGE NamedFieldPuns #-} | ||
|
||
module IndirectPuns () where | ||
|
||
newtype Foo = Foo { field :: Int } | ||
|
||
unFoo :: Foo -> Int | ||
unFoo Foo{field} = field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters