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

Test Plan: Validate with 7.10.1

Reviewers: gridaphobe, jstolarek, austin

Reviewed By: jstolarek

Subscribers: thomie, jstolarek

Differential Revision:

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
import GHC.Stack (CallStack)
......@@ -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
(?callStack :: CallStack) =>
TCvSubst -> Type -> Type
substTy subst@(TCvSubst in_scope tenv cenv) ty
| isEmptyTCvSubst subst = ty
| otherwise = ASSERT2( isValidTCvSubst subst,
Supports Markdown
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