[Haskell-cafe] ifdef based on which OS you're on

Andrew Cowie andrew at operationaldynamics.com
Sat Feb 16 01:57:14 CET 2013

On Fri, 2013-02-15 at 15:16 +0100, Krzysztof Skrzętnicki wrote:

> See:
> http://www.haskell.org/cabal/users-guide/developing-packages.html#configurations

That link says os():

        "Tests if the current operating system is name. The argument is
        tested against System.Info.os on the target system. There is
        unfortunately some disagreement between Haskell implementations
        about the standard values of System.Info.os. Cabal canonicalises
        it so that in particular os(windows) works on all
        implementations. If the canonicalised os names match, this test
        evaluates to true, otherwise false. The match is

So this approach is back to relying on System.Info.os either way. What
worries me is the "Cabal canonicalises it", which seems to indicate that
there are actually many values that show up in 'os' that need to be
regularized. Anyone have any idea if the Cabal library exposes this


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130216/e2c97af2/attachment.pgp>

More information about the Haskell-Cafe mailing list