[Haskell-cafe] cabal haddock --executables

21 views
Skip to first unread message

Maurizio Vitale

unread,
Apr 1, 2015, 9:18:01 PM4/1/15
to Haskell Cafe
I'm getting:

cabal: internal error when calculating transitive package dependencies.
Debug info: []

and it seems this has been a problem for quite some while (and it has to do with the executable depending on a local library)

is there any known workaround?

Thanks,

  Maurizio

Omari Norman

unread,
Apr 2, 2015, 9:06:42 AM4/2/15
to Maurizio Vitale, Haskell Cafe
Are you talking about this bug?

https://github.com/haskell/cabal/issues/1919

I'm not sure what you mean by "local" library.  My workaround is not to have the executables depend on the library that's in the same package.  That leads to two problems: 1) longer compile times, and 2) duplication in the Cabal file.

To deal with problem 2, I use Cartel:

https://hackage.haskell.org/package/cartel

which brings its own problems but also solves other problems and so it's the best solution I've found.

But Cartel does not help with problem 1.  One solution to that problem is to split the executables into different packages.  That's no fun either.


_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe


Maurizio Vitale

unread,
Apr 2, 2015, 9:36:30 AM4/2/15
to Omari Norman, Haskell Cafe
That is the bug I'm referring to.

Long term the right solution for me would be to have libraries and executables in different cabal packages, but during initial development it is nice to have everything in the same tree.
The single tree solution helps also with the build of a related website. Although you could split that into its own package as well and inject the results of haddock, coverage, tests etc. from multiple packages into the generated html page, everything is much easier if it is all in one tree. I'll try with having separate packages under a toplevel directory with a Makefile that stitch everything together.


Reply all
Reply to author
Forward
0 new messages