Sometimes I just need to check a couple of things in GHCi, not specific to any project. I could run ghci, but then I don't get access to any packages except the ones that are installed globally.
With stack I can run stack ghci --package lens, for instance.
With cabal I have to create something like this:
cabal-version: 2.2
name: global
version: 0
library
build-depends: base, lens
default-language: Haskell2010
and then run cabal new-repl in a directory with this .cabal-file.
I'd prefer to write cabal new-repl --package lens:
- it would find a suitable build plan for the specified packages and launch GHCi in this environment
- it would not create
dist-newstyle in the current directory, instead it could use ~./cabal/dist-global or similar
Sometimes I just need to check a couple of things in GHCi, not specific to any project. I could run
ghci, but then I don't get access to any packages except the ones that are installed globally.With
stackI can runstack ghci --package lens, for instance.With
cabalI have to create something like this:and then run
cabal new-replin a directory with this.cabal-file.I'd prefer to write
cabal new-repl --package lens:dist-newstylein the current directory, instead it could use~./cabal/dist-globalor similar