# Maintaining haskell programs

**URL:** <https://discourse.haskell.org/t/maintaining-haskell-programs/7166>\
**Category:** Uncategorized\
**Created:** [August 2, 2023, 4:49am UTC](https://discourse.haskell.org/t/maintaining-haskell-programs/7166 "2023-08-02T04:49:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Lsmor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/lsmor/32/3302_2.png) [@Lsmor](https://discourse.haskell.org/u/Lsmor)\
**Post date:** [August 2, 2023, 6:57am UTC](https://discourse.haskell.org/t/maintaining-haskell-programs/7166/5 "2023-08-02T06:57:16Z")

</div>

It’s difficult to tell without knowing the explicit problem he faced. I agree the interactions among `cabal`-`ghc`-`stack`-`hls` might be difficult. For example:

- if you want to use a non `stackage` package in a `stack` project you have to modify `stack.yaml` and `package.yaml`/`.cabal`. This is well documented in `stack`'s user guide, so I am not blaming `stack` for this, but in general we should warn people that developer _do not_ read documentation at all (hyperbole), so instead of writing a nice user guide is much better to throw a big and explicit error with “you are doing this and that wrong”. I can imagine someone having trouble with this ending up with a mess of environment difficult to maintain.

- `ghc` extension ecosystem is a mess. 9 out of 10 times, I don’t know what they do; I just turn them on because the compiler suggest them in an cryptic error message. Moreover, extensions can break other extensions, and compiler updates might change the behaviour of type-level extensions. For example:

- In my computer `hls` performs horrible with `ghc-9.4.5`. Imagine updating the compiler and the language server works… but works very bad.

- `cabal` prefers to download new package versions instead of using the one already in the system (is there any flag like `--prefer-installed`??). If you copy paste code from a project to another within you own computer I might happen that you download different versions in each project leading to compilation fails in the new version, which can’t be ported to the old one. Yes, this is bad user behaviour because we should add dependency bounds in the cabal file, but even then, if your bounds aren’t tight enough, you may end up in this situation

So these are a few example on how maintainbility can be difficult when you update the compiler, or libraries or you simply copy code from other place.

---

_[View the full topic](https://discourse.haskell.org/t/maintaining-haskell-programs/7166)._
