X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FInfo.hs;h=c27ef9d704b434777ce096fd62f84797009b1c66;hb=77543763506582c254dc24b7bfd0b17f31ca3596;hp=dfb30188d43590a92f326d21c848a1110ae44519;hpb=ec3ba94b254bd444e7a1c560c1d91c4879948c69;p=haskell-directory.git diff --git a/System/Info.hs b/System/Info.hs index dfb3018..c27ef9d 100644 --- a/System/Info.hs +++ b/System/Info.hs @@ -18,7 +18,9 @@ module System.Info os, -- :: String arch, -- :: String compilerName, -- :: String +#ifdef __GLASGOW_HASKELL__ compilerVersion -- :: Version +#endif ) where import Prelude @@ -50,8 +52,17 @@ compilerName = "hugs" #error Unknown compiler name #endif -compilerVersion :: Version #ifdef __GLASGOW_HASKELL__ +compilerVersion :: Version compilerVersion = Version {versionBranch=[maj,min], versionTags=[]} where (maj,min) = __GLASGOW_HASKELL__ `divMod` 100 #endif + +#ifdef __NHC__ +compilerVersion :: Version +compilerVersion = Version {versionBranch=[maj,min], versionTags=[]} + where version = __NHC__ `divMod` 100 + maj = fst version + min = snd version +#endif +