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

Artyom Kazak artyom.kazak at gmail.com
Fri Feb 15 15:15:39 CET 2013


Andrew Cowie <andrew at operationaldynamics.com> писал(а) в своём письме Fri,  
15 Feb 2013 17:05:13 +0300:

> So my question is: what's an appropriate Haskell mechanism for building
> code that is OS / arch  / distro specific? It's not like I have autoconf
> running generating me a config.h I could #include, right?

You can know the OS and arch without even resorting to CPP; see  
System.Info  
(http://hackage.haskell.org/packages/archive/base/latest/doc/html/System-Info.html),  
which defines `os` and `arch`.



More information about the Haskell-Cafe mailing list