External Publication
Visit Post

Suggestion: deprecate the global default package environment file

Haskell Community [Unofficial] April 4, 2026
Source

jaror:

So I’d rather see further limitations of that instead of changing ghc’s behavior. For example we could say --lib is only allowed if you also provide --package-env. You could still say --package-env=default

Well, that would also be a breaking change.

Related issues:

  • [RFC] Revive cabal sandboxes (UX) · Issue #10098 · haskell/cabal · GitHub
  • Separate cabal install --lib into own command (cabal env) · Issue #6481 · haskell/cabal · GitHub
  • [UX] Current mechanism to install several libraries and expose them to the user? · Issue #9581 · haskell/cabal · GitHub

I personally think for something like cabal install --lib, which is by nature an imperative command, the default should indeed be to install globally. That’s what 98% of the package managers do and what users are generally used to.

The problem is that cabal’s UX is now a hot mess, with some semi-declarative interface that doesn’t actually go all the way. And now people mix both of those paradigms and cabal isn’t very good at separating those. This is what sandboxes were good at: imperative, but local.

Discussion in the ATmosphere

Loading comments...