haskell / haskell/cabal

"cabal new-exec ghc" should work outside of .cabal projects

Open
#5,895 17 comments 6 reactions 0 assignees View on GitHub
cabal-install: cmd/exec cabal-install: v2-build system type: discussion
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Nearly half my time in Haskell development is spend running `ghc` on individual files, outside of `.cabal` projects, which might have some number of dependencies. Prevously, I could just `old-install` all of my dependencies, point `ghc` to the right file, and everything would Just Work™. Unfortunately, there isn't really a `new-*` equivalent of this. There's `cabal new-exec ghc`, but that assumes that you're in a `.cabal` project, which usually _isn't_ the case for me.

Similarly to how you can run `cabal new-repl -b dep1,...,depn` outside of a `.cabal` project today, I'd like to request that `cabal new-exec -b dep1,...,depn ghc -- Foo.hs` work outside of `.cabal` projects. This would operate conceptually in a similar manner to `stack exec ghc`.

cc @phadej

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.