[commit: ghc] ghc-8.0: TyCoRep: Restore compatibility with 7.10.1 (56a9f93)
git at git.haskell.org
git at git.haskell.org
Fri Jan 22 12:19:53 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/56a9f936357be739fefde111f918531661bede4a/ghc
>---------------------------------------------------------------
commit 56a9f936357be739fefde111f918531661bede4a
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
(cherry picked from commit ede055eb230ac33da276f1416678f99e32e83da2)
>---------------------------------------------------------------
56a9f936357be739fefde111f918531661bede4a
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 bd5745a..1522464 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
{-
%************************************************************************
@@ -1816,7 +1818,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