atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Works on only some projects #237

Closed cscalfani closed 6 years ago

cscalfani commented 6 years ago

I've several projects. They all use Stack LTS 9.10. Only 1 of them both brings up the Haskell IDE menu AND works.

The other projects only display Haskell IDE menu AFTER I open the <project>.cabal file.

I turned on DEBUG on haskell-ghc-mod and it prints lots of debug info for the one and only project that works.

It prints nothing in the other projects even after I open the <project>.cabal file and the Haskell IDE menu item is displayed.

With zero debug info, I'm at a loss. I'd really appreciate any help in debugging this further.

lierdakil commented 6 years ago

The other projects only display Haskell IDE menu AFTER I open the .cabal file.

Package activation is deferred until language-haskell grammar is used. So it should load when you open a Haskell source file.

General description of your issue sounds suspiciously similar to grammar conflict. Would you happen to have any Haskell grammar packages besides language-haskell?

cscalfani commented 6 years ago

I disabled all other Haskell packages except for ide-haskell, language-haskell, haskell-ghc-mod and autocomplete-haskell and it started working. So next, I enabled one at a time and restarted Atom. And it continued to work even after I enabled the last of them. Now, I'm even more confused. So, here's my list of packages. Maybe you can tell me which one MAY interfere:

cscalfani commented 6 years ago

After I posted the above comment, I opened another project and it did NOT work. So I took a different tact. I disabled one at a time and it appears that haskell-grammar is the culprit.

Thanks for the tip. I will close this later in the day after I've had some time to see that it's still working.

lierdakil commented 6 years ago

FWIW, conflict with haskell-grammar is documented in https://atom-haskell.github.io/core-packages/ide-haskell/#known-conflicts. Note that haskell-grammar is unmaintained since 2015.

Probably need to make it more visible.

Also while on topic, ide-haskell-hoogle might provide a better experience than haskell-hoogle. Disclaimer: I'm biased, since the former is Atom Haskell project, while the latter is not; in my defence, haskell-hoogle is also unmaintained since 2015

cscalfani commented 6 years ago

I suspect I installed haskell-grammar long before I started using ide-haskell. But I think having the warning about conflicts in other places would be helpful, e.g. in the package's property page in Atom. I'll change to ide-haskell-hoogle. Thanks again for your help and for working on these great tools.