[Haskell-cafe] cabal v2 global install status

amindfv at mailbox.org amindfv at mailbox.org
Thu May 5 19:02:04 UTC 2022

On Thu, May 05, 2022 at 05:50:01AM -0400, Ivan Perez wrote:
> This workflow (installing packages in
> a store in the project directory) should be not just supported, but
> *encouraged*. Keeping all changes local *should be the default*. Experts,
> and those who want to optimize installation times, avoid re-compilation,
> those who know how to navigate $HOME/.cabal if need be, etc., can then
> choose to share that installation directory across projects and use
> $HOME/.cabal instead (or whatever else they want). But that's a conscious
> choice made by an expert who understands the choice.

I'm actually coming from a bit of the opposite perspective. :)

I'm pretty happy, overall, with `cabal new-repl`, `cabal new-build`, etc. What I miss is the ability to have global installs. More specifically, I want to *pay all my costs at install time*. I'm okay with futzing with package dependencies, etc. (e.g. resolving conflicts in transitive dependencies) when installing a new package, but once I've paid that cost I want to be able to simply run `ghci` and have my curated set of packages available to me. I don't want to have to `mkdir foo ; cd foo ; cabal init ; $EDITOR cabal.project ; cabal new-repl` just to run a simple one-liner in ghci. I also like being able to write quick scripts and run them with `runghc` without creating an entire project for each and every one.


More information about the Haskell-Cafe mailing list