atom-haskell / ide-haskell

Haskell IDE plugin for Atom editor
https://atom.io/packages/ide-haskell
Other
232 stars 30 forks source link

Best choice for backend #228

Closed aviatesk closed 3 years ago

aviatesk commented 5 years ago

Hi, @lierdakil

First off, thanks for your wonderful packages. Specially, I really appreciate Atom-Typescript.

I've just started to learn & hack Haskell and want to setup a development environment for it within Atom. I read through Atom Haskell's the documentation, and more, found ghc-mod is already deprecated and the development for editor supports is now being converged on Haskell-IDE-Engine.

So could you tell me what do you think is the best choice to setup Haskell development within Atom for now ? In other words, is haskell-ghc-mod going to be deprecated as well and is it better to use ide-haskell-repl ? I also wonder whether you have any future plan to leverage HIE's features.

Thanks in advance for your help !

lierdakil commented 5 years ago

Hi. Sorry, I didn't reply sooner, I was down with a flu for the past few days (and technically still am, but I'm well enough to write a semi-coherent reply)

Thanks for your kind words, but Atom-TypeScript isn't "mine" -- it just so happened that I wound up as the maintainer when nobody else was willing to.

The current state of Atom-Haskell is like it's described in the docs in many words. The TL;DR is this: it's possible to build ghc-mod with GHC 8.4 and 8.6, after some patches -- which can be found as pull requests/branches on the ghc-mod repo (neither of which are intended to be merged, btw). For now, it's probably the most feature-rich way to get a working Haskell development environment in Atom, but I will be the first to admit it's a bit too complicated for the average beginner, and, to be perfectly honest, it's also somewhat clunky in general. So I don't really advise that.

Personally, I don't really bother with ghc-mod -- for the most part, ide-haskell-cabal with strategic use of holes (_) works well enough for me right now.

ide-haskell-repl works for type tooltips and check-on-save, but it can be a bit buggy in the "backend" mode -- it works fine for small projects, for the most part, but not so fine on bigger ones.

Honestly, I was planning on deprecating haskell-ghc-mod and using HIE since the beginning of this year at least, but I just didn't manage to find time to actually do that. I'm still planning on it, but I'll be honest, I'm pretty busy with my day job and, well, life in general at the moment. Can't really give any hard dates for when that happens. Help is welcome.

If you want to play around with HIE, there is ide-haskell-hie, which is a somewhat misleading name, since it's not at all part of the Atom-Haskell tool stack. It's a really thin wrapper for the language service protocol which HIE uses. Sadly, it works mostly through atom-ide-ui, which is also technically discontinued (but it still works). The main downside is it isn't integrated with the rest of Atom-Haskell stack at all -- which means you get separate error messages/markers from ide-haskell and ide-haskell-hie, which may be annoying. It's usable though.

I don't really know what would be the "best" choice, honestly. ide-haskell-repl is probably the most hassle-free option at the moment. haskell-ghc-mod is the most feature-rich, but is a lot of work to set up. ide-haskell-hie is somewhere in the middle.

If you're not particularly attached to Atom, VSCode reportedly has great support for HIE, by the way.

Sorry I can't give a more satisfying answer.

aviatesk commented 5 years ago

Thanks for your detailed reply !

I'm just an beginner for Haskell, and will work only for smaller projects in the near future, and so ide-haskell-repl & ide-haskell-cabal (and the other helper packages) seems to be better choice for me. Thanks for your advices !

Honestly, I was planning on deprecating haskell-ghc-mod and using HIE since the beginning of this year at least, but I just didn't manage to find time to actually do that. I'm still planning on it, but I'll be honest, I'm pretty busy with my day job and, well, life in general at the moment. Can't really give any hard dates for when that happens. Help is welcome.

I see the situation. If I find I like Haskell and ide-haskell, I will definitely help you out. 😃 It's good that Atom-Haskell doesn't rely on atom-ide-ui.

If you're not particularly attached to Atom, VSCode reportedly has great support for HIE, by the way.

Ahhh, this is not my option 😅... I love Atom after all !

Btw, sorry for your flu and take care of yourself !