# Stack(age) and HLS workflow(s)?

**URL:** <https://discourse.haskell.org/t/stack-age-and-hls-workflow-s/15260>\
**Category:** Learn\
**Created:** [December 3, 2026, 6:33pm UTC](https://discourse.haskell.org/t/stack-age-and-hls-workflow-s/15260 "2026-12-03T18:33:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktf](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ktf/32/4600_2.png) [@ktf](https://discourse.haskell.org/u/ktf)\
**Post date:** [December 3, 2026, 6:33pm UTC](https://discourse.haskell.org/t/stack-age-and-hls-workflow-s/15260/1 "2026-12-03T18:33:03Z")

</div>

So far, I’ve used Stack (and Stackage) with decent success in my Haskell projects. But I’ve been hitting some walls, and I’m curious if I’m missing something.

Recently, I [tried to upgrade my Stackage LTS](https://discourse.haskell.org/t/ormolu-stackage-hls-issues/15250) and hit some issues. That linked thread talks about the missing `ormolu` package, but in this thread I’d like to discuss my HLS issues 😃

TL;DR: HLS (installed via ghcup) 2.14.0.0 breaks with the latest Stackage LTS (GHC 9.10.3). It works out-of-the-box with the GHC 9.8 and 9.6 LTSs, though. It seems to be an ABI mismatch, maybe? I’m not sure if this is a bug or expected behavior.

Doing some research I’ve found that: **“In general, HLS needs to be compiled with the exact same compiler you used to compile your project.”** The solutions seem to be: set Stack to use system GHC or compile HLS with your exact stack GHC.

Okay, but: Stack allows me to isolate projects and GHC versions, which is what I want. **How can I work on multiple projects, each of which uses a different GHC version?** Do I need to compile a separate HLS for _every_ project? Does ghcup let me do that easily? Or… what are my other options? Juggle different GHC versions in ghcup and switch them around manually, set stack to use “system” GHC?

I guess what I’m confused about here is: I’m using what I thought was a pretty common setup: stack + stackage LTS + HLS. But, like… for example, if I `stack new`, the default project doesn’t even work with HLS. I get a bunch of “expected Cabal-xxx…” errors in the logs.

How do people manage these issues in their own projects? Am I doing something crazy? 😅

---

<div class="post-metadata">

**Author:** ![Execute](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/execute/32/5920_2.png) [@Execute](https://discourse.haskell.org/u/Execute)\
**Post date:** [December 3, 2026, 7:11pm UTC](https://discourse.haskell.org/t/stack-age-and-hls-workflow-s/15260/2 "2026-12-03T19:11:11Z")

</div>

I personally just don’t use hls lol

---

<div class="post-metadata">

**Author:** ![LaurentRDC](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/laurentrdc/32/4950_2.png) [@LaurentRDC](https://discourse.haskell.org/u/LaurentRDC)\
**Post date:** [December 3, 2026, 7:29pm UTC](https://discourse.haskell.org/t/stack-age-and-hls-workflow-s/15260/3 "2026-12-03T19:29:18Z")

</div>

In GHCUp, you can see in the list of compilers which ones are “HLS-powered”. I run HLS 2.15, and I can see that GHC 9.10.3 is “HLS-powered”. That’s a good start.

Then, make sure that `stack` is using the GHC that’s installed through GHCUp, not some other one. I can’t recall how that’s configured, but if you install `stack` via GHCUp, it should already be the case.

Finally, in case HLS doesn’t detect your configuration for some reason, [you can also add a `hie.yaml` file at the root of your project to tell HLS about your build tool](https://github.com/haskell/hie-bios#stack).

So, to recap:

- Install everything through GHCUp : `ghc`, `stack`, and `hls`
- Use the right HLS version; 2.14 probably works, just check through GHCUp with `ghcup tui`
- In case the above fails, set up a `hie.yaml`

---

<div class="post-metadata">

**Author:** ![Execute](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/execute/32/5920_2.png) [@Execute](https://discourse.haskell.org/u/Execute)\
**Post date:** [December 3, 2026, 7:32pm UTC](https://discourse.haskell.org/t/stack-age-and-hls-workflow-s/15260/4 "2026-12-03T19:32:54Z")

</div>

~/.stack/config.yaml

system-ghc: true  
install-ghc: false

overrides project level config if there is any (which usually there isn’t when it comes to this)

---

<div class="post-metadata">

**Author:** ![LaurentRDC](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/laurentrdc/32/4950_2.png) [@LaurentRDC](https://discourse.haskell.org/u/LaurentRDC)\
**Post date:** [December 3, 2026, 7:33pm UTC](https://discourse.haskell.org/t/stack-age-and-hls-workflow-s/15260/5 "2026-12-03T19:33:02Z")

</div>

> [@ktf](#):
>
> How can I work on multiple projects, each of which uses a different GHC version?

Regarding this: any given version of HLS supports many versions of GHC. It’s not strictly true that HLS only supports the exact compiler version that compiled it.

For example, HLS 2.15 supports:

- GHC 9.14.1
- GHC 9.12.4
- GHC.9.10.3
- GHC 9.8.4
- GHC 9.6.7

That’s not a bad list!

---

<div class="post-metadata">

**Author:** ![ktf](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ktf/32/4600_2.png) [@ktf](https://discourse.haskell.org/u/ktf)\
**Post date:** [December 3, 2026, 8:15pm UTC](https://discourse.haskell.org/t/stack-age-and-hls-workflow-s/15260/6 "2026-12-03T20:15:46Z")

</div>

> [@Execute](#):
>
> system-ghc: true  
> install-ghc: false

> [@LaurentRDC](#):
>
> make sure that `stack` is using the GHC that’s installed through GHCUp

The problem here is that this effectively turns off one of the major useful features of Stack: project-level isolation. Which then makes it harder to manage multiple projects which all use different GHC versions, harder to keep consistency across environments, etc. Right?

> [@LaurentRDC](#):
>
> Regarding this: any given version of HLS supports many versions of GHC. It’s not strictly true that HLS only supports the exact compiler version that compiled it.

In _theory_ this is true… but I’m using GHC 9.10.3 (installed via stack/Stackage) and HLS 2.14.0.0 (which supports GHC 9.10.3), and they are not compatible despite being the same version. I’ve run into this issue before as well with HLS and been given the above advice then as well: it’s not just GHC _version_ that matters. (In the past I ran into weird HLS errors, but this time the server won’t even start.)

So it sounds like people just don’t use project-level isolation, or people don’t tend to work on multiple projects at the same time? Or all their projects use the same GHC version? Or they just use fully isolated environments/containers for everything? Or… other? 😃

---

<div class="post-metadata">

**Author:** ![Execute](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/execute/32/5920_2.png) [@Execute](https://discourse.haskell.org/u/Execute)\
**Post date:** [December 3, 2026, 8:17pm UTC](https://discourse.haskell.org/t/stack-age-and-hls-workflow-s/15260/7 "2026-12-03T20:17:04Z")

</div>

I never saw the point of having a GHC for each project, and that seems a little dumb..unless it’s patched GHCs
