> 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.

Currently, the cabal dir is "global" (for all packages from one user), but installation is somehow local (non-interference between projects, allegedly).

With sandboxes, the cabal dir is local (for this exclusive project/directory, although easily customizable), but installation is global (there's just one package DB). You pay all costs of figuring out a good plan ahead of time (the package DB must be consistent), but once you are there, there's just one of each, so it was "safe" to expose them all.

> I also like being able to write quick scripts and run them with `runghc` without creating an entire project for each and every one.

Same. I find the possibility of running GHC/ghci with all packages enabled in a local dir extremely useful for scripting purposes, and just generally to develop.

Ivan

On Thu, 5 May 2022 at 15:02, amindfv@mailbox.org <amindfv@mailbox.org> wrote:
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.

Cheers,
Tom