rikvdkleij / intellij-haskell

IntelliJ plugin for Haskell
https://rikvdkleij.github.io/intellij-haskell/
Apache License 2.0
1.31k stars 94 forks source link

Auto-Completion on Types and Type Constructors defined in the same file (at least Record or Union) stopped working after upgrade to 1.0.0-beta76 #588

Closed enolive closed 4 years ago

enolive commented 4 years ago

after the latest update I noticed that I am no longer able to auto-complete my defined types (and also their type constructors) where they are defined. I am on the latest IntelliJ Ultimate (2020.1.3)

However, this still works when putting them in a module and trying to access from a different file

I tried to update my Haskell tools which unfortunately did not help. I can also reproduce the problem in a fresh Haskell project.

Steps to reproduce:

module Lib where

data Test = Test String

data Person = Person {first :: String, last :: String}

data Union = First | Second

someFunc :: IO ()
someFunc = putStrLn "someFunc"

when trying to use the types by starting to type in Lib.hs (Test, Union, Person) or their Type constructors (Test, Person, First, Second) I don't get any auto-completion suggestions. However, using them inside of Spec.hs (after importing Lib, of course) works perfectly.

I noticed some strange TypeInfo in the auto-complete selection in 1.0.0-beta75 (which I am going back for now, as this is a deal breaker for me :cry:). Thought it might help

grafik

grafik

rikvdkleij commented 4 years ago

Thanks for extensive report!

Because the were in duplicates in the code completion suggestions i made a change there. So that probably caused your issue. Will take a look.

rikvdkleij commented 4 years ago

Should be fixed in https://github.com/rikvdkleij/intellij-haskell/releases/tag/v1.0.0-beta77

Not yet officially released because i first want to know if bug #587 is fixed

enolive commented 4 years ago

I can confirm that the fix works, at least for Record and Union types.

I still don't get any auto-completion suggestions for type aliases (such as type LastName = Name)

beta75:

grafik

beta77:

grafik

rikvdkleij commented 4 years ago

Ok, thanks, will fix that.

rikvdkleij commented 4 years ago

Should be fixed in beta78

enolive commented 4 years ago

Yeah, I can confirm that. Thanks for your help! :heart: