[commit: ghc] master: TyCoRep: Restore compatibility with 7.10.1 (ede055e)
git at git.haskell.org
git at git.haskell.org
Thu Jan 21 13:58:06 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/ede055eb230ac33da276f1416678f99e32e83da2/ghc
>---------------------------------------------------------------
commit ede055eb230ac33da276f1416678f99e32e83da2
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Thu Jan 21 11:19:23 2016 +0100
TyCoRep: Restore compatibility with 7.10.1
Sadly CallStack wasn't present in 7.10.1, breaking the build when
bootstrapping from this version.
This patch essentially disables CallStack support for stage1 builds with
7.10.*. This doesn't seem so unreasonable though as stage2 will still
work.
Test Plan: Validate with 7.10.1
Reviewers: gridaphobe, jstolarek, austin
Reviewed By: jstolarek
Subscribers: thomie, jstolarek
Differential Revision: https://phabricator.haskell.org/D1812
GHC Trac Issues: #11472
>---------------------------------------------------------------
ede055eb230ac33da276f1416678f99e32e83da2
compiler/types/TyCoRep.hs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index 85d91f5..04fb02c 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -151,7 +151,9 @@ import UniqFM
import qualified Data.Data as Data hiding ( TyCon )
import Data.List
import Data.IORef ( IORef ) -- for CoercionHole
+#if MIN_VERSION_GLASGOW_HASKELL(7,10,2,0)
import GHC.Stack (CallStack)
+#endif
{-
%************************************************************************
@@ -1844,7 +1846,13 @@ isValidTCvSubst (TCvSubst in_scope tenv cenv) =
-- | Substitute within a 'Type'
-- The substitution has to satisfy the invariants described in
-- Note [Generating the in-scope set for a substitution].
-substTy :: (?callStack :: CallStack) => TCvSubst -> Type -> Type
+
+substTy ::
+-- CallStack wasn't present in GHC 7.10.1, disable callstacks in stage 1
+#if MIN_VERSION_GLASGOW_HASKELL(7,10,2,0)
+ (?callStack :: CallStack) =>
+#endif
+ TCvSubst -> Type -> Type
substTy subst@(TCvSubst in_scope tenv cenv) ty
| isEmptyTCvSubst subst = ty
| otherwise = ASSERT2( isValidTCvSubst subst,
More information about the ghc-commits
mailing list