I\'m contributing to Alex, and it obviously depends on a lot of libraries and should compile for a lot of versions.
I need to use a function that is only available from
That's described in section 6.11.3.1 of GHC's users guide:
For version
x.y.z
of GHC, the value of__GLASGOW_HASKELL__
is the integer ⟨xyy⟩ (if ⟨y⟩ is a single digit, then a leading zero is added, so for example in version 6.2 of GHC,__GLASGOW_HASKELL__==602
). More information in GHC version numbering policy.
So for 7.6.1
, you would check __GLASGOW_HASKELL__ >= 706
. The reason for this are versions like 7.10.x
.