Commit ede055eb authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

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
parent 395ec414
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment