[commit: ghc] wip/new-flatten-skolems-Aug14: Implement `MIN_VERSION_GLASGOW_HASKELL()` macro (3bac93c)
git at git.haskell.org
git at git.haskell.org
Thu Oct 9 07:38:35 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/new-flatten-skolems-Aug14
Link : http://ghc.haskell.org/trac/ghc/changeset/3bac93cdcac55b498ba57029d5c006d15e319c6e/ghc
>---------------------------------------------------------------
commit 3bac93cdcac55b498ba57029d5c006d15e319c6e
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Sun Oct 5 22:35:22 2014 +0200
Implement `MIN_VERSION_GLASGOW_HASKELL()` macro
This exposes the `cProjectPatchLevel{1,2}` value at the CPP level to
allow it to be used in CPP conditionals. Concretely, GHC 7.10.2.20150623
would result in
#define __GLASGOW_HASKELL__ 710
#define __GLASGOW_HASKELL_PATCHLEVEL1__ 2
#define __GLASGOW_HASKELL_PATCHLEVEL2__ 20150623
while GHC 7.10.3 results in
#define __GLASGOW_HASKELL__ 710
#define __GLASGOW_HASKELL_PATCHLEVEL1__ 3
and finally GHC 7.9.20141009 results in
#define __GLASGOW_HASKELL__ 709
#define __GLASGOW_HASKELL_PATCHLEVEL1__ 20141009
As it's error-prone to properly express CPP conditionals for testing GHC
multi-component versions, a new macro `MIN_VERSION_GLASGOW_HASKELL()` is
provided (also via the new CPP include file `ghcversion.h`)
Finally, in order to make it easier to define the new CPP macro
`MIN_VERSION_GLASGOW_HASKELL()`, a new default-included
`include/ghcversion.h` is used for the new CPP definitions.
Reviewed By: ekmett, austin, #ghc
Differential Revision: https://phabricator.haskell.org/D66
>---------------------------------------------------------------
3bac93cdcac55b498ba57029d5c006d15e319c6e
.gitignore | 1 +
aclocal.m4 | 7 ++++
compiler/ghc.mk | 4 +++
compiler/main/DriverPipeline.hs | 28 +++++++++++----
docs/users_guide/phases.xml | 79 +++++++++++++++++++++++++++++++++++++++++
ghc.mk | 1 +
includes/ghc.mk | 39 +++++++++++++++++---
mk/project.mk.in | 2 ++
8 files changed, 150 insertions(+), 11 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 3bac93cdcac55b498ba57029d5c006d15e319c6e
More information about the ghc-commits
mailing list