<div dir="ltr"><div>> 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.</div><div><br></div><div></div><div>Currently, the cabal dir is "global" (for all packages from one user), but installation is somehow local (non-interference between projects, allegedly).</div><div><br></div><div>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.</div><div><br></div><div>> I also like being able to write quick scripts and run them with `runghc`
without creating an entire project for each and every one.<br>
</div><div><br></div><div>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.<br></div><div><br></div><div>Ivan<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 5 May 2022 at 15:02, <a href="mailto:amindfv@mailbox.org">amindfv@mailbox.org</a> <<a href="mailto:amindfv@mailbox.org">amindfv@mailbox.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, May 05, 2022 at 05:50:01AM -0400, Ivan Perez wrote:<br>
> This workflow (installing packages in<br>
> a store in the project directory) should be not just supported, but<br>
> *encouraged*. Keeping all changes local *should be the default*. Experts,<br>
> and those who want to optimize installation times, avoid re-compilation,<br>
> those who know how to navigate $HOME/.cabal if need be, etc., can then<br>
> choose to share that installation directory across projects and use<br>
> $HOME/.cabal instead (or whatever else they want). But that's a conscious<br>
> choice made by an expert who understands the choice.<br>
<br>
I'm actually coming from a bit of the opposite perspective. :)<br>
<br>
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.<br>
<br>
Cheers,<br>
Tom<br>
</blockquote></div>