pre-710 compatibility stuff

Herbert Valerio Riedel hvriedel at
Sat Oct 24 10:56:58 UTC 2015

On 2015-10-24 at 12:19:38 +0200, lennart spitzner wrote:
> hi,
> should we use
> #if __GLASGOW_HASKELL__ < 710
> or
> #if !MIN_VERSION_base(4,8,0)
> ?
> currently both are used in different places, and i have no idea if
> there is a difference/if it matters. if it does not, i suggest
> conventionizing one of the two.

IMO, guarding with MIN_VERSION_base() ought to refer to properties of
the `base` library (e.g. availability of class instances or other
symbols), while guarding with __GLASGOW_HASKELL__ should refer to
properties (e.g. availability/semantics of language pragmas) and use of
a specific GHC version. While we currently have a 1:1 relationship
between base and GHC, this wasn't always the case (and it may make sense
to relax this constraint again at some point in the future).


More information about the cabal-devel mailing list