What are possible values for the System.Info "os" function in Haskell? What are possible values for the System.Info "os" function in Haskell? windows windows

What are possible values for the System.Info "os" function in Haskell?


The variables for GHC are taken from the "autotools" tool suite, the tool suite that produces the well-known "configure" scripts that are almost always used when compiling something (./configure; make; make install). configure uses a standard "compiler identification string" like x86_64-unknown-linux-gnu for C compilers, and additionally computes a more detailed set of variables that identify the host platform. These variables are used in the generated Makefile of GHC, and this file further produces the ghcplatform.h file you see in the Info.hs file.

Almost the exact same procedure is used by HUGS to get the platform variables, except that the header file is named differently (as you are able to see in the source code that you linked).

Since both GHC and HUGS98 on Windows are compiled with MinGW and autotools as well, the variables are consistent on that platform.