haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.39k stars 211 forks source link

Field puns & Wildcards should not have snippets #1378

Open Avi-D-coder opened 5 years ago

Avi-D-coder commented 5 years ago

A completion for bar is generated that wrongly takes an argument. This is part of a larger problem where snippets are incorrectly generated in a context they should not be; type signatures(#829), instances declarations, module exports.

@fendor Do present completion contexts provide enough information to fix this?

image

fendor commented 5 years ago

Current context does not give that information. Since Completions seem to be cached per module, this is involved with a lot of problems, because we do not know how a symbol was brought into scope. EDIT: I wonder if GHC knows the difference after the module has been type-checked.