Cabal package feature request [was: Streams 0.1e released]
robdockins at fastmail.fm
Thu Jun 8 11:44:48 EDT 2006
[thread hijacked and moved to libraries]
On Jun 8, 2006, at 11:00 AM, Bulat Ziganshin wrote:
> I released Streams library version 0.1e. Changes are:
> - Fixed bug: "openFD name WriteMode" don't truncated files on unixes
> * Full library now released under BSD3 license, thanks to John Goerzen
> + Now cabalized, thanks to Jeremy Shaw
> Download: http://freearc.narod.ru/Streams.tar.gz
> Docs: http://haskell.org/haskellwiki/Library/Streams
> btw, my cabal file contain line:
> Build-Depends: base, Win32, template-haskell
> if i correctly understand, this will not work on unix systems, while
> without Win32 package program can't be compiled on my windows box.
> what i can do here? only provide two separate cabal files - one for
> unix, one for windows and give to user text instructions about
> manual renaming of appropriate file?
This brings up a feature I have sometimes wanted from Cabal. I'd
like to be able to say the following: "Cabal, find and use package X
if it exists. Furthermore, when CPPing source code, set a #define
HAS_PACKAGE_X so I can do conditional compilation based on the (non-)
avaliablility of package X". Is this possible? Difficult? It seems
like a nice way to handle a number of problems, including platform-
dependencies (as here) and optional features with external dependencies.
Speak softly and drive a Sherman tank.
Laugh hard; it's a long way to the bank.
More information about the Libraries