Stack and HLS, questions about the present and future

I use VS Code (code) with the Haskell extension (HLS-powered) when developing Stack with Stack, mostly on Windows 11. It took me a little while to realise that I had to run code in the Stack environment for HLS to work. That is, command:

stack exec -- code .

to open VS Code.

For the most part, that works fine for me. My experience is written up here: Contributor's guide - The Haskell Tool Stack ; and here: Stack and Visual Studio Code - The Haskell Tool Stack.

I don’t find HLS ‘very flakey’ with Stack, just the ordinary level of HLS niggles. In my own experience, HLS works fine*** with Stack’s default new project template. I would recommend Stack for newcomers to Haskell - they are a group of Stack users that is front of mind for me.

As I have posted elsewhere, both the HLS project and the Stack project are keen that HLS support Stack and that Stack can output the information that HLS needs to support Stack. The open issue on Stack’s repository has been mentioned above.

I don’t know that anyone is ‘being paid’ to develop Stack further. I’ve always assumed that all Stack development is done by volunteers.

EDIT: *** By ‘works fine’, I mean that stack build has to be run before VS Code is opened (otherwise HLS ‘hangs’). However, I think is a long-standing niggle with HLS.

3 Likes