[Haskell-cafe] Cabal Configurations - Beta-Testers Wanted
Thomas Schilling
nominolo at googlemail.com
Thu Jun 28 07:39:50 EDT 2007
Hi Pepe,
I partially fixed it. A full fix would require a feature that is not
yet implemented. I'll take a look at it later today.
The problem was, that shim has no library section, but my
compatibility translator created an incomplete one, just to carry the
dependencies. The right solution would be to add them to each
executable, but there they won't be check yet for them, yet. So,
your Cabal file is now internally translated to:
Name: shim
Version: 0.1
License: BSD3
License-file: LICENSE
Copyright: (c) 2006 Benedikt Schmidt
Maintainer: Benedikt Schmidt <beschmi at cloaked.de>
Library {
-- library section is only there to contain the dependencies
-- It is therefore marked as not buildable
Buildable: False
Build-Depends: unix, ghc, haskell98, base, parsec, network,
Cabal<1.1.7, mtl, filepath
}
Executable shim {
Main-is: Main.hs
Ghc-Options: -O0
}
Executable shim-udproxy {
Main-is: Shim/Udproxy.hs
Ghc-Options: -O0 -main-is Shim.Udproxy.main
}
Please, update cabal+configs.
>
> > configure: Reading installed packages...
> > Configuring shim-0.1...
> > Setup.lhs: Error: Non-empty library, but empty exposed modules
> list. Cabal may not build this library correctly
>
>
> If this is a bug, let me know as soon as it's fixed.
> I want to use the os() predicate in the shim descriptor, is that
> already working?
This should work:
Name: shim
Version: 0.1
License: BSD3
License-file: LICENSE
Copyright: (c) 2006 Benedikt Schmidt
Maintainer: Benedikt Schmidt <beschmi at cloaked.de>
Library {
Buildable: False
if os(mingw32) {
Build-depends: ghc, haskell98, base, parsec, network,
Cabal<1.1.7, mtl, filepath
} else {
Build-Depends: unix, ghc, haskell98, base, parsec, network,
Cabal<1.1.7, mtl, filepath
}
}
Executable shim {
Main-is: Main.hs
Ghc-Options: -O0
}
Executable shim-udproxy {
Main-is: Shim/Udproxy.hs
Ghc-Options: -O0 -main-is Shim.Udproxy.main
}
BTW, the os() test should test for the value returned by
System.Info.os .
/ Thomas
More information about the cabal-devel
mailing list