Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add local definitions to outline #4312

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions ghcide/test/exe/OutlineTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,27 @@ tests =
(R 0 0 0 9)
]
],
testSymbolsA
"function with nested scope"
["a x = g x where g = h where h = id"]
[ docSymbolWithChildren
"a"
SymbolKind_Function
(R 0 0 0 34)
[ docSymbol "x" SymbolKind_Function (R 0 0 0 34)
, docSymbol "g" SymbolKind_Function (R 0 0 0 34)
, docSymbol "h" SymbolKind_Function (R 0 0 0 34)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These locations are wrong? They all have the range of the original binding?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, shouldn't h be a child of g, not of a?

]
],
testSymbolsA
"function with patterns"
["f 1 = g where g = 2", "f _ = g where g = 3"]
[ docSymbolWithChildren
"f"
SymbolKind_Function
(R 0 0 1 19)
[docSymbol "g" SymbolKind_Function (R 0 0 1 19)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong, there should be two gs?

],
testSymbolsA "type synonym" ["type A = Bool"] [docSymbol' "A" SymbolKind_TypeParameter (R 0 0 0 13) (R 0 5 0 6)],
testSymbolsA "datatype" ["data A = C"] [docSymbolWithChildren "A" SymbolKind_Struct (R 0 0 0 10) [docSymbol "C" SymbolKind_Constructor (R 0 9 0 10)]],
testSymbolsA
Expand Down
Loading