[Haskell-cafe] __GLASGOW_HASKELL__ for GHC 7.4

Nicolas Trangez nicolas at incubaid.com
Tue Jan 17 12:39:41 CET 2012

On Tue, 2012-01-17 at 15:35 +0400, Eugene Kirpichov wrote:
> Hi,
> I'm fixing a build error in a package that depends on the RTS API, which
> changed in 7.4, using #if __GLASGOW_HASKELL__ >= 740.
> However, build log shows that __GLASGOW_HASKELL__ is still 704, not 740 as
> I'd expect.
> Is this a bug?

I don't think so. I recently came across [1]:

Stable Releases
Stable branches are numbered x.y, where y is even. Releases on the
stable branch x.y are numbered x.y.z, where z (>= 1) is the patchlevel
number. Patchlevels are bug-fix releases only, and never change the
programmer interface to any system-supplied code. However, if you
install a new patchlevel over an old one you will need to recompile any
code that was compiled against the old libraries.

The value of __GLASGOW_HASKELL__ (see Section 4.11.3, “Options affecting
the C pre-processor”) for a major release x.y.z is the integer xyy (if y
is a single digit, then a leading zero is added, so for example in
version 6.8.2 of GHC we would have __GLASGOW_HASKELL__==608).

As such, release 7.4.0 would yield __GLASGOW_HASKELL__ 704.



More information about the Haskell-Cafe mailing list