1 -----------------------------------------------------------------------------
3 -- Module : System.Info
4 -- Copyright : (c) The University of Glasgow 2001
5 -- License : BSD-style (see the file libraries/base/LICENSE)
7 -- Maintainer : libraries@haskell.org
8 -- Stability : experimental
9 -- Portability : portable
11 -- Information about the characteristics of the host
12 -- system lucky enough to run your program.
14 -----------------------------------------------------------------------------
20 compilerName, -- :: String
21 compilerVersion -- :: Version
27 -- | The version of 'compilerName' with which the program was compiled
28 -- or is being interpreted.
29 compilerVersion :: Version
30 compilerVersion = Version {versionBranch=[maj,min], versionTags=[]}
31 where (maj,min) = compilerVersionRaw `divMod` 100
33 -- | The operating system on which the program is running.
36 -- | The machine architecture on which the program is running.
39 -- | The Haskell implementation with which the program was compiled
40 -- or is being interpreted.
41 compilerName :: String
43 compilerVersionRaw :: Int
47 compilerName = "nhc98"
48 compilerVersionRaw = __NHC__
50 #elif defined(__GLASGOW_HASKELL__)
51 #include "ghcplatform.h"
55 compilerVersionRaw = __GLASGOW_HASKELL__
57 #elif defined(__HUGS__)
62 compilerVersionRaw = 0 -- ToDo
65 #error Unknown compiler name