Skip to content

cabal new-repl without a project #5425

Description

@int-index

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions