# Ormolu + Stackage (+ HLS) issues

**URL:** <https://discourse.haskell.org/t/ormolu-stackage-hls-issues/15250>\
**Category:** Learn\
**Created:** [December 2, 2026, 10:55pm UTC](https://discourse.haskell.org/t/ormolu-stackage-hls-issues/15250 "2026-12-02T22:55:52Z")\
**Posts on this page:** 4\
**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 2, 2026, 10:55pm UTC](https://discourse.haskell.org/t/ormolu-stackage-hls-issues/15250/1 "2026-12-02T22:55:52Z")

</div>

I use ormolu to format the code in my (Stack) project. Today I tried to update to the Stackage [24.69 LTS](https://www.stackage.org/lts-24.69) (with GHC 9.10.3), and I realized ormolu is not in the package set.

I tried various combinations of adding various versions of ormolu to `extra-deps`, but there were various other version conflicts with other packages. Eventually, I found something that at least lets my project build:

```haskell
extra-deps:
- ormolu-0.8.0.2
- Cabal-syntax-3.14.2.0

```

…but then I realized that this breaks HLS in my project. (I start seeing `Cabal-syntax` version errors when trying to start the HLS server.)

What are my options? I just want people who use my project to be able to format the code with a consistent version of ormolu. (I don’t even care which version!) But I also was hoping to use GHC 9.10.3. And obviously I want HLS to work! I didn’t expect this to be such a challenge…

So far the only thing I can think to do is switch my LTS to `23.28 (ghc-9.8.4)` instead, which contained ormolu. But that seems a silly reason to make my entire project depend on an older version of GHC!

(If it’s helpful, [here’s a link](https://github.com/keithfancher/tvmv/commit/c8dc19f71f694c1eb8cbe5d3f8d247060a41011b) to the relevant diff in my `stack.yaml`.)

I appreciate any advice!

**EDIT:** I thought I could try switching to Fourmolu instead, but then I realized that it is also not in the Stackage 24.69 snapshot 🥲

---

<div class="post-metadata">

**Author:** ![brandonchinn178](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/brandonchinn178/32/5103_2.png) [@brandonchinn178](https://discourse.haskell.org/u/brandonchinn178)\
**Post date:** [December 3, 2026, 2:26am UTC](https://discourse.haskell.org/t/ormolu-stackage-hls-issues/15250/2 "2026-12-03T02:26:06Z")

</div>

IMO ormolu/fourmolu doesn’t belong in your stack.yaml dependencies. Just install with ghcup and be on your way.

One technique I like to use in my projects is use [dotslash](https://dotslash-cli.com), which guarantees anyone contributing uses the same version when running `tools/fourmolu ...args`

> <https://github.com/brandonchinn178/skeletest/blob/refs%2Fheads%2Fmain/tools%2Ffourmolu>

---

<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, 4:01am UTC](https://discourse.haskell.org/t/ormolu-stackage-hls-issues/15250/3 "2026-12-03T04:01:30Z")

</div>

> [@brandonchinn178](#):
>
> IMO ormolu/fourmolu doesn’t belong in your stack.yaml dependencies.

Yeah, it’s not a _code_ dependency, so that makes sense. I only added it a day or two ago because it seemed a reasonable way to enforce a version on a tool in a consistent way _within_ the repo. I can throw something like this into a `Makefile`:

```haskell
stack exec --package ormolu -- ormolu [whatever]

```

…and it worked! Until I tried to change my Stackage LTS today, that is. Many other build tools I’ve worked with in other languages allow for something similar.

Is there a better way to do something like this without adding another external tool like dotslash? It seemed like it’d be in the Stack wheelhouse, which is why I thought it made sense to use Stack in this way.

> [@brandonchinn178](#):
>
> Just install with ghcup and be on your way.

I didn’t even know you could do this! I thought GHCup was just for GHC, HLS, cabal, and stack.

---

<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, 4:16am UTC](https://discourse.haskell.org/t/ormolu-stackage-hls-issues/15250/4 "2026-12-03T04:16:38Z")

</div>

> [@ktf](#):
>
> (I start seeing `Cabal-syntax` version errors when trying to start the HLS server.)

Incidentally, I’m seeing these HLS errors even _without_ adding `Cabal-syntax` to my `extra-deps` – it seems HLS is erroring out specifically just from my switching to GHC 9.10.3. Works fine with GHC 9.6.x and 9.8.x. (With HLS `2.14.0.0`.)

…but that’s another issue 😅, I don’t mean to distract this thread.

I guess, worst case, I can just put in the readme: “install `ormolu` on your system before running `make format`” or whatever… or just use a tool like dotslash.

> [@brandonchinn178](#):
>
> One technique I like to use in my projects is use [dotslash](https://dotslash-cli.com)

It’s just, what I like so much about Stack is that it’s self-contained. Anybody, without knowing anything about Haskell tooling, can install Stack and `cd` into a project and type `stack build` and it all just works in a consistent way. It makes everything easier, IMO… contributing, CI, testing on random systems, etc.
