asterius icon indicating copy to clipboard operation
asterius copied to clipboard

Add hie.yaml config file and enable ghcide support

Open TerrorJack opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. For a long time, our official recommended IDE is ghcid, since it was relatively easy to set up a ghci prompt using various hacks. We needed hacks mainly because of the binaryen package links with a static C++ library which has all sorts of weird chemistries with the ghci runtime linker. We don't have that concern today, since binaryen now links with the system-provided binaryen C++ library, and ghci is capable of loading the .so file normally. As a result, asterius:lib can be properly loaded as a stack ghci target, and thus it should be supported by hie-bios out of the box.

It would smoothen developer experience a lot if we add official ghcide support. ghcid has served us well for a long time, but the supported features are indeed too limited.

Describe the solution you'd like

  • [ ] Add hie.yaml for asterius and test it locally
  • [ ] Set up ghcide (or something similar which is based on hie-bios) and its VSCode extension in the dev image

TerrorJack avatar May 03 '20 19:05 TerrorJack

I just gave ghcide a try. Seems nice (hover, goto, etc), but there's a problem: to avoid loading the .hs sources which aren't actually used by the host asterius package, we need to hand-write a multi-cradle hie.yaml config file. And it seems each executable target needs a new entry in hie.yaml, which makes it quite boilerplaty. Will look into this further before we switch away from ghcid to ghcide.

TerrorJack avatar May 20 '20 13:05 TerrorJack

The ghcide project has been integrated with haskell-ide-engine and is now known as haskell-language-server.

Could you take a second look at this to see what's possible these days? Would love to be able to use the haskell language server for Asterius in vscode.

JorisBlanken avatar Jun 04 '21 17:06 JorisBlanken