cpp symbol __GLASGOW_HASKELL__ doesn't reflect version number
I've just installed ghc 7.4.1 and it seems to get the value of the GLASGOW_HASKELL variable wrong:
Load the program below in ghci and run main. I get "704" as output.
{-# OPTIONS_GHC -cpp #-}
module Main where
#if __GLASGOW_HASKELL__ == 704
main = putStrLn "704"
#else
main = putStrLn "something else"
#endif
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |