cabal or stack command to fetch and add dependency to .cabal file

With node.js, you can run `npm install --save package@1.01`, and that version of the package will be retrieved and added to your list of dependencies. If you leave off the version number, it will retrieve the latest version from a default repository of packages. Are there any plans to add something this to either cabal or stack?

Yes, stack has plans for automatic stack.yaml maintenance:
https://github.com/commercialhaskell/stack/issues/115
It's been purposely back-burnered as we focus on more central features
first, but it's actually a pretty good issue for a newcomer to embark on
since it doesn't interact with the rest of the system too much.
I'm not exactly sure though what you mean by "fetch" here. To clarify:
stack will automatically download the source for the dependency when
building.
On Mon, Sep 7, 2015 at 11:02 AM, xu xiut
With node.js, you can run `npm install --save package@1.01`, and that version of the package will be retrieved and added to your list of dependencies. If you leave off the version number, it will retrieve the latest version from a default repository of packages.
Are there any plans to add something this to either cabal or stack?
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

added to your list of dependencies Sorry, lost that part, you still will need to update your .cabal manually with specified version.
Better aim for `stack` nowadays, it's much easier to maintain working environment.
participants (3)
-
Michael Snoyman
-
Sergey Bushnyak
-
xu xiut