if os (darwin) && os-version() >= 10.7
or
if os-version(>=10.7)
Or something with that kind of behavior.
I can do it with make and sw_vers-productVersion, but I want to save the Cabal file with build-type: Simple (I mean it even has a frame field) .
Context: I have some bindings to some of the Cocoa functions introduced in OSX 10.7. I hope that Cabal will not try to build on older Macs and not through useless “symbol not found” errors or Methods such as this to send spam to the person who installed the package.
https://www.haskell.org/cabal/users-guide/developing-packages.html#configurations (under “conditions”) seems Say no.
I want a The operating system version is a conditional sign, not just the operating system:
if os(darwin) && os-version() >= 10.7
Either
if os-version(>=10.7)
Or something with that behavior.
I You can do it with make and sw_vers-productVersion, but I want to save Cabal files with build-type: Simple (I mean it even has a frame field).
Context: I introduced it in OSX 10.7 Some of the Cocoa functions have some bindings. I hope that Cabal does not try to work on older Macs Build instead of spamming the person who installed the package through useless “symbol not found” errors or the like.
https://www.haskell.org/cabal/users-guide/developing -packages.html#configurations (under “conditions”) seems to say no.
You are right. Cabal does not provide this feature. It is relevant ticket. However, for OS X, you don’t need to move from the build type: simple. Instead, you can use CPP and macros provided by apple, as described in another SO question.