Related to this compiler issue.
Frequently, when typing the name of a function or a type, and there are multiple candidates (I think, the most common function is singleton, which exists basically in every container: Map, HashMap, String…), the candidates that go first are the wrong ones.
I think it would be useful to check what types are used by the current source file, and then suggest those types first, and others second.
Steps to reproduce
- Create a new project with
spago init
- Put the following code to
src/Main.purs:
module Main where
import Prelude
import Effect (Effect)
import Parsing (Parser)
import Parsing.Combinators (manyTill)
import Parsing.String (anyChar, char)
parseOption :: Parser String (List Char)
parseOption = manyTill anyChar (char '=')
main :: Effect Unit
main = pure unit
- Install deps with
spago install parsing lists
- Turn on the lsp server in an editor of your choice, put caret over
List text, remove t and type t manually. Completion would pop up.
Expected
In the completion, the first List candidate will be the "non-lazy" version.
Actual
In the completion, the first List candidate is the lazy one.
Version
0.18.0
Related to this compiler issue.
Frequently, when typing the name of a function or a type, and there are multiple candidates (I think, the most common function is
singleton, which exists basically in every container:Map,HashMap,String…), the candidates that go first are the wrong ones.I think it would be useful to check what types are used by the current source file, and then suggest those types first, and others second.
Steps to reproduce
spago initsrc/Main.purs:spago install parsing listsListtext, removetand typetmanually. Completion would pop up.Expected
In the completion, the first
Listcandidate will be the "non-lazy" version.Actual
In the completion, the first
Listcandidate is the lazy one.Version
0.18.0