hasLibs and hasExes honest reporting?
Yaakov Nemoy
loupgaroublond at gmail.com
Tue Apr 29 17:59:00 EDT 2008
Hi List,
First off, I want to say hi, as this is my first post. I'm trying to
get some badly needed updates to cabal-rpm, so we can get more Haskell
packages into Fedora. All of the following is with Cabal 1.2.3.0 and
GHC 6.8.2 as packaged in Fedora 8.
In the module Distribution.PackageDescription, there are four
functions, hasExes, and hasLibs, as well as libModules and exeModules.
These functions claim to do the obvious for a PackageDescription.
The only problem I'm having is with packages like xmonad, which have
both Executables and Libraries.
In the case of xmobar, hasLibs returns False, and an empty list for
libModules, but True and a list for hasExes and exeModules
respectively.
In the case of xmonad-contrib, the opposite is true, that is there are
no Executables at all, but a bucket load of Libraries.
In the case of xmonad, hasLibs returns True. but returns a nonempty
list. hasExes returns True, and with the same nonempty list. I would
expect the lists to be the same, as all the Modules listed therein are
needed to compile the executable, and also to be linked with the user
supplied config file. The only problem I see is with hasLibs itself.
I heard something a while back that xmonad needs to be compiled twice,
because this setup is considered an edge case in Cabal. Because
xmonad is the reason why I'm working on getting Haskell packages into
Fedora, I'm not sure I want to think of it that way. Is this a bug,
or just a 'feature' I need to watch out for?
Cheers,
Yaakov Nemoy
More information about the cabal-devel
mailing list