Skip to content

What cabal install did when type this command? #9210

Closed Answered by fgaz
WendaoLee asked this question in Q&A
Discussion options

You must be logged in to vote

For the package manager,I'm familiar with npm of nodejs.It seems like cabal install remote-package won't modify the .cabal like the npm install remote-package will modify the package.json.And it not download files into the workspace like npm.

Yes, the install command of cabal is very different from the npm one. To do the equivalent of npm install you don't have to run cabal install at all. Instead, you add the package you want to use to the build-depends section of the .cabal file of your package. Cabal will take care of fetching and building the dependency as needed when you run cabal build, cabal run, or other similar commands.

cabal install instead is more like npm install --global. …

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@WendaoLee
Comment options

@ffaf1
Comment options

@WendaoLee
Comment options

Comment options

You must be logged in to vote
1 reply
@WendaoLee
Comment options

Answer selected by WendaoLee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants