3 -----------------------------------------------------------------------------
5 -- Module : System.Info
6 -- Copyright : (c) The University of Glasgow 2001
7 -- License : BSD-style (see the file libraries/base/LICENSE)
9 -- Maintainer : libraries@haskell.org
10 -- Stability : experimental
11 -- Portability : portable
13 -- Information about the characteristics of the host
14 -- system lucky enough to run your program.
16 -----------------------------------------------------------------------------
22 compilerName, -- :: String
23 compilerVersion -- :: Version
29 -- | The version of 'compilerName' with which the program was compiled
30 -- or is being interpreted.
31 compilerVersion :: Version
32 compilerVersion = Version {versionBranch=[major, minor], versionTags=[]}
33 where (major, minor) = compilerVersionRaw `divMod` 100
35 -- | The operating system on which the program is running.
38 -- | The machine architecture on which the program is running.
41 -- | The Haskell implementation with which the program was compiled
42 -- or is being interpreted.
43 compilerName :: String
45 compilerVersionRaw :: Int
49 compilerName = "nhc98"
50 compilerVersionRaw = __NHC__
52 #elif defined(__GLASGOW_HASKELL__)
53 #include "ghcplatform.h"
57 compilerVersionRaw = __GLASGOW_HASKELL__
59 #elif defined(__HUGS__)
64 compilerVersionRaw = 0 -- ToDo
67 #error Unknown compiler name