You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cabal init doesn't allow specifying an alternative location for GHC executable #5654
For many invocations of cabal, I can pass a -w argument to specify where GHC can be found, which is very useful if you have local GHCs set up in your home directory. However, cabal init doesn't allow this, instead opting to fail and complain about a missing GHC. Would it be possible to have cabal init accept a -w flag too?
+1. I just ran into this issue as well when taking a look at the end to end process to create a new project using cabal-install and a specific GHC version, you can see the steps I took here.
At the bottom of the post I have a list of some changes that would really improve the experience, having cabal init accept -w is one of them. From what I can tell this could be as simple as having init create (or update) the cabal.project.local file to contain a with-compiler directive that the rest of the init process could use.
Activity
m-renaud commentedon Nov 3, 2018
+1. I just ran into this issue as well when taking a look at the end to end process to create a new project using
cabal-installand a specific GHC version, you can see the steps I took here.At the bottom of the post I have a list of some changes that would really improve the experience, having
cabal initaccept-wis one of them. From what I can tell this could be as simple as havinginitcreate (or update) thecabal.project.localfile to contain awith-compilerdirective that the rest of the init process could use.Add `-w`/`--with-compiler` flag to `cabal init`
hvr commentedon Nov 3, 2018
I've implemented this the simplest way I could think of in the PR at #5658
23Skidoo commentedon Nov 3, 2018
Related: #4936, #4956.
Add `-w`/`--with-compiler` flag to `cabal init` (#5658)
Add `-w`/`--with-compiler` flag to `cabal init` (#5658)