[Haskell-cafe] cabal v2 global install status

Brandon Allbery allbery.b at gmail.com
Thu May 5 19:11:39 UTC 2022


Cabal has a script capability, although it's poorly documented.

For one-liners, there is `cabal repl --build-depends='...'. Not ideal,
perhaps, but works well enough for me.

On Thu, May 5, 2022 at 3:06 PM amindfv--- via Haskell-Cafe
<haskell-cafe at haskell.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
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.



-- 
brandon s allbery kf8nh
allbery.b at gmail.com


More information about the Haskell-Cafe mailing list