<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Usually, I'm using technique described here
<a class="moz-txt-link-freetext" href="http://blog.haskell-exists.com/yuras/posts/stop-abusing-cpp-in-haskell.html">http://blog.haskell-exists.com/yuras/posts/stop-abusing-cpp-in-haskell.html</a><br>
by using
<meta http-equiv="content-type" content="text/html; charset=utf-8">
`extra-source-dir` key in cabal file and splitting implementation.<br>
<br>
<div class="moz-cite-prefix">On 04/01/2015 05:56 PM, Aldo Davide
wrote:<br>
</div>
<blockquote
cite="mid:trinity-753a91e4-822d-4afc-bad3-52ed192cccaa-1427900213743@3capp-mailcom-bs10"
type="cite">
<pre wrap="">I don't see how you can avoid CPP. Even if cabal supported checking the OS version, you would still probably need CPP.
Sent: Wednesday, April 01, 2015 at 10:40 AM
From: "Sergey Bushnyak" <a class="moz-txt-link-rfc2396E" href="mailto:sergey.bushnyak@sigrlami.eu"><sergey.bushnyak@sigrlami.eu></a>
To: <a class="moz-txt-link-abbreviated" href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>
Subject: [Haskell-cafe] Specify OS version
Hi Cafe!
I have program written in Haskell and Swift that runs on Mac. This program uses some features that was introduced in last version of OS X “Yosemite” 10.10, but some of my users use previous version "Maverics " 10.9. Is there some technique that allows me to extend my cabal file and specify which *version* of os is currently in use and don't load some of modules?
AFAIK, Cabal's `conditional` doesn't provide such mechanism, but something like
```
if os(osx) && ver(=10.10)
if os(osx) && ver(<=10.9)
```
will be nice.
Maybe there is other approach to this problem?I don't want to use `CPP` extension to handle this within code.
Thanks
--
Best regards,
Sergey Bushnyak _______________________________________________ Haskell-Cafe mailing list <a class="moz-txt-link-abbreviated" href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a> <a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
</pre>
</blockquote>
<br>
</body>
</html>