[Haskell-cafe] Hdevtools cabal support

Joey Hess joey at kitenet.net
Fri Feb 21 22:07:18 UTC 2014

Maxim Kulkin wrote:
> I'm pretty new to Haskell, but was doing Haskell development for several month. I'm fan of Vim editor and was happy to find out that there are good tools to support Haskell development with Vim, e.g. vim-hdevtools. But it turned out that it not of much use in my project where we rely on Cabal packages and sandboxes.
> As part of scratching own itch I have implemented support for Cabal packages for Hdevtools.

Sandboxes aside, there seem to be plenty of reasons for hdevtools to
integrate with cabal.

To use hdevtools in one of my projects, I have to run it like this.

hdevtools check git-annex.hs -g -cpp -g -i -g -idist/build/git-annex/git-annex-tmp -g -i. -g -idist/build/autogen -g -Idist/build/autogen -g -Idist/build/git-annex/git-annex-tmp -g -IUtility -g -DWITH_TESTSUITE -g -DWITH_S3 -g -DWITH_ASSISTANT -g -DWITH_INOTIFY -g -DWITH_DBUS -g -DWITH_PAIRING -g -DWITH_XMPP -g -optP-include -g -optPdist/build/autogen/cabal_macros.h -g -odir -g dist/build/git-annex/git-annex-tmp -g -hidir -g dist/build/git-annex/git-annex-tmp -g -stubdir -g dist/build/git-annex/git-annex-tmp -g -threaded -g -Wall -g -XHaskell98 -g -XPackageImports

This was obviously not an easy command line to come up with, and it frequently
breaks. And all of it should be able to be derived from the cabal file.

So, I am excited about your branch. But it doesn't seem to have the
smarts to avoid needing that yet.

joey at darkstar:~/src/git-annex>~/tmp/hdevtools/dist/build/hdevtools/hdevtools --version
hdevtools: version (ghc-7.6.3-x86_64-linux, cabal-1.16.0)
joey at darkstar:~/src/git-annex>~/tmp/hdevtools/dist/build/hdevtools/hdevtools check git-annex.hs
     warning: #warning Building without disk free space checking support [-Wcpp]
     #warning Building without disk free space checking support
     error: missing binary operator before token "("
     #if MIN_VERSION_directory(1,2,0)
     warning: #warning foo [-Wcpp]
     #warning foo
phase `C pre-processor' failed (exitcode = 1)
- exit 1

see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140221/4aec0837/attachment.sig>

More information about the Haskell-Cafe mailing list