syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.7k stars 4.9k forks source link

Haskell layer -> hie does not exist as package #13249

Closed Martinsos closed 4 years ago

Martinsos commented 4 years ago

Description :octocat:

In instructions for installing haskell spacemacs layer, it says that we should install hie cabal package via cabal or stack. However, there is no such package on either Stackage or Hackage, at least I was not able to find one! I don't know if I am just not understanding something here, or documentation is outdated.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: Got an error message.

Expected behaviour: :heart: :smile: To install hie without any errors.

System Info :computer:

Backtrace :paw_prints:

solomon-b commented 4 years ago

Instructions for HIE installation on various operating systems is described here: https://github.com/haskell/haskell-ide-engine#installation

Martinsos commented 4 years ago

Instructions for HIE installation on various operating systems is described here: https://github.com/haskell/haskell-ide-engine#installation

Sure, but then it would be better to point to those docs instead of saying that hie can be installed via cabal, right? I think that throws people off (it threw me off) -> I spend some time trying to figure out if there is package on hackage/stackage for hie that I should install, until I realized that there is no such package and that I need to install it manually.

solomon-b commented 4 years ago

The only mention of HIE is in the LSP section here:

lsp requires an appropriate installation of hie to provide the Haskell language server. hie is built on ghc-mod, so many of the same considerations apply.

It doesn't mention any build tools or say how to install HIE.

I could see the case for adding a link to the HIE docs here, however I'm not a Spacemacs maintainer. I would be happy to make a PR to add some clarifying notes here if that is desirable from the maintainers.

Martinsos commented 4 years ago

I was referring to this part of the README.org in https://github.com/syl20bnr/spacemacs/tree/develop/layers/+lang/haskell:

This layer requires some cabal packages:

apply-refact (required by hlint-refactor)
hlint (required by hlint-refactor)
stylish-haskell (optional for haskell-mode)
hasktags (optional)
hoogle (optional for haskell-mode and helm-hoogle)
ghc-mod (optional for completion)
intero (optional for completion)
hie (optional for completion)

To install them, use the following command (or the stack equivalent):

$ cabal install apply-refact hlint stylish-haskell hasktags hoogle

From this, it reads that hie is cabal package -> that is what caused confusion in my case.

solomon-b commented 4 years ago

Ahh, I can see how that would be a bit confusing. HIE is a large project that has to be installed in particular ways depending on your operating system.

Generally there are a bunch of ways to install haskell packages that are often operating system dependent. It would probably be a good idea to replace this section with links to the instructions for each of these packages. I'm happy to do that some time this week.

Martinsos commented 4 years ago

No problem, I think just removing hie from this list and mentioning it below as separate, system dependency, would be enough, even without link to installation instructions. Thanks!

On Sun, Feb 9, 2020 at 6:56 PM Solomon Bothwell notifications@github.com wrote:

Ahh, I can see how that would be a bit confusing. HIE is a large project that has to be installed in particular ways depending on your operating system.

Generally there are a bunch of ways to install haskell packages that are often operating system dependent. It would probably be a good idea to replace this section with links to the instructions for each of these packages. I'm happy to do that some time this week.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/syl20bnr/spacemacs/issues/13249?email_source=notifications&email_token=AALXFB5FFAK2SIKUNB75DVDRCA7U3A5CNFSM4KRKTPT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELGTKYY#issuecomment-583873891, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALXFB24DAI25YUNKRI5QBLRCA7U3ANCNFSM4KRKTPTQ .

smile13241324 commented 4 years ago

I have had a look at the hie installation instructions and they were really a bit lacking. I have added a link to the hie installation instruction now and also removed hie from the initial list of cabal packages to install on develop.

@Martinsos could you double check whether this would make matters more clear, and close the ticket if it does?

Btw: What's your opinion about the amount of backend choices in the haskell layer, does it come clear which backend to choose in which situation or is the amount of supported backends more confusing?

Martinsos commented 4 years ago

Great, I think that is it, it should be clear now (at least to me)! I will close the issue.

I already have experience from before, so for me it was relatively clear which backend does what. I was using Intero before, in vanilla emacs, but started looking for smth else since Intero is not maintained any more (keeping that in mind, it will probably make sense to remove it from the list of backends at some point?). I tried using Dante in my vanilla emacs config, but it did not work out of the box and I did not set it up at the end. Same with lsp -> I mostly got it working in vanilla emacs, but it was still not as good as Intero. That is why I switched to spacemacs, and was looking forward to haskell layer ;)! However, I have to say I still have same problems with haskell lsp in spacemacs as I had in my vanilla emacs -> spurious errors, type and auto-completion information showing in too small popup windows so it is not usable. That is why I am currently using ghci backend, but will soon try experimenting again -> I will probably try to use Dante or Lsp again, I just have to put more time into researching how to configure them. I think it is good taht you made it clear what the default option is, for backend, that should be enough for somebody new.

On Mon, Feb 10, 2020 at 9:18 PM Maximilian Wolff notifications@github.com wrote:

I have had a look at the hie installation instructions and they were really a bit lacking. I have added a link to the hie installation instruction now and also removed hie from the initial list of cabal packages to install on develop.

@Martinsos https://github.com/Martinsos could you double check whether this would make matters more clear, and close the ticket if it does?

Btw: What's your opinion about the amount of backend choices in the haskell layer, does it come clear which backend to choose in which situation or is the amount of supported backends more confusing?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/syl20bnr/spacemacs/issues/13249?email_source=notifications&email_token=AALXFBZCVYJF26GAQ4C4R3DRCGY7RA5CNFSM4KRKTPT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKDQ5A#issuecomment-584333428, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALXFB5E4HY6WGTHD5ZELW3RCGY7RANCNFSM4KRKTPTQ .