How to update a cabal dependency automatically

30 views
Skip to first unread message

ye yan

unread,
Jul 29, 2014, 1:52:39 AM7/29/14
to haskel...@googlegroups.com
I have been working on a haskell scotty project recently. I have just added configuration support for the project, which added an extra dependency of Control.Lens. My question is: is there a way update .cabal file automatically, just like cabal init but without recreate .cabal file?

Thanks in advance.

Alexander Berntsen

unread,
Jul 29, 2014, 7:48:09 AM7/29/14
to haskel...@haskell.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
No. I've been planning to work on that, but haven't had the time yet.
Thanks for the reminder.
- --
Alexander
alex...@plaimi.net
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlPXieUACgkQRtClrXBQc7VsQQD+PB/Tyr7S/a5SGE+aN0CgKWHu
RFcn35Eqi8jgsaPs/rAA/3/IqdT9DyFZGiYZXHm4m7ndSQyQvy8CZ5pVv+5QlcDN
=h5Ex
-----END PGP SIGNATURE-----
_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

ye yan

unread,
Jul 29, 2014, 8:32:54 AM7/29/14
to haskel...@googlegroups.com, haskel...@haskell.org
Thanks for replying. I will be using cabal init --overwrite until the new feature is complete :D

Lyndon Maydwell

unread,
Jul 29, 2014, 8:01:52 PM7/29/14
to ye yan, haskell-cafe, haskel...@googlegroups.com
If your project is in git you might be able to take advantage of `git
add -p` in combination with `cabal init --overwrite`.

ye yan

unread,
Jul 30, 2014, 3:54:30 AM7/30/14
to haskel...@googlegroups.com, haskel...@haskell.org
git add -p works very good in this case, thank you for your advise. Just wondering how does cabal solve dependencies?

I updated my cabal file. ghci works find with my development box. but when I checkout with other computer I got a dependency error. It seems cabal failed to detect the correct library version I am using in ghci. Or just because for parsec library I have multiple versions installed? 

Tikhon Jelvis

unread,
Jul 30, 2014, 1:31:19 PM7/30/14
to ye yan, haskell-cafe, haskel...@googlegroups.com
Do you have a copy of the error message we can look at? It's hard to say anything without that. If the output is long, it might be better to put it up on http://lpaste.net/ instead of including it right in the email.
Reply all
Reply to author
Forward
0 new messages