[commit: ghc] master: Remove unused substTyWithBinders functions (c37a583)
git at git.haskell.org
git at git.haskell.org
Mon Mar 21 12:31:48 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/c37a583fb9059053f83f1ab0c3cb7eb7047b1a31/ghc
>---------------------------------------------------------------
commit c37a583fb9059053f83f1ab0c3cb7eb7047b1a31
Author: Bartosz Nitka <niteria at gmail.com>
Date: Mon Mar 21 05:33:44 2016 -0700
Remove unused substTyWithBinders functions
Originally I wanted to only remove substTyWithBindersUnchecked, but
since both of them are unused maybe we don't need them.
Test Plan: ./validate
Reviewers: austin, goldfire, bgamari, simonpj
Reviewed By: simonpj
Subscribers: thomie, simonmar
Differential Revision: https://phabricator.haskell.org/D2025
GHC Trac Issues: #11371
>---------------------------------------------------------------
c37a583fb9059053f83f1ab0c3cb7eb7047b1a31
compiler/typecheck/TcType.hs | 2 +-
compiler/types/TyCoRep.hs | 26 ++------------------------
compiler/types/Type.hs | 2 +-
3 files changed, 4 insertions(+), 26 deletions(-)
diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs
index 5b37a00..cf3b317 100644
--- a/compiler/typecheck/TcType.hs
+++ b/compiler/typecheck/TcType.hs
@@ -156,7 +156,7 @@ module TcType (
Type.substTy, substTys, substTyWith, substTyWithCoVars,
substTyAddInScope,
substTyUnchecked, substTysUnchecked, substThetaUnchecked,
- substTyWithBindersUnchecked, substTyWithUnchecked,
+ substTyWithUnchecked,
substCoUnchecked, substCoWithUnchecked,
substTheta,
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index 6fe1ce3..9a2036a 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -97,9 +97,9 @@ module TyCoRep (
substCoWith,
substTy, substTyAddInScope,
substTyUnchecked, substTysUnchecked, substThetaUnchecked,
- substTyWithBindersUnchecked, substTyWithUnchecked,
+ substTyWithUnchecked,
substCoUnchecked, substCoWithUnchecked,
- substTyWithBinders, substTyWithInScope,
+ substTyWithInScope,
substTys, substTheta,
lookupTyVar, substTyVarBndr,
substCo, substCos, substCoVar, substCoVars, lookupCoVar,
@@ -1944,28 +1944,6 @@ substTysWithCoVars :: [CoVar] -> [Coercion] -> [Type] -> [Type]
substTysWithCoVars cvs cos = ASSERT( length cvs == length cos )
substTys (zipCvSubst cvs cos)
--- | Type substitution using 'Binder's. Anonymous binders
--- simply ignore their matching type.
-substTyWithBinders ::
--- 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
- [TyBinder] -> [Type] -> Type -> Type
-substTyWithBinders bndrs tys = ASSERT( length bndrs == length tys )
- substTy (zipTyBinderSubst bndrs tys)
-
--- | Type substitution using 'Binder's disabling the sanity checks.
--- Anonymous binders simply ignore their matching type.
--- The problems that the sanity checks in substTy catch are described in
--- Note [The substitution invariant].
--- The goal of #11371 is to migrate all the calls of substTyUnchecked to
--- substTy and remove this function. Please don't use in new code.
-substTyWithBindersUnchecked :: [TyBinder] -> [Type] -> Type -> Type
-substTyWithBindersUnchecked bndrs tys
- = ASSERT( length bndrs == length tys )
- substTyUnchecked (zipTyBinderSubst bndrs tys)
-
-- | Substitute within a 'Type' after adding the free variables of the type
-- to the in-scope set. This is useful for the case when the free variables
-- aren't already in the in-scope set or easily available.
diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs
index a3efac0..f7aea67 100644
--- a/compiler/types/Type.hs
+++ b/compiler/types/Type.hs
@@ -166,7 +166,7 @@ module Type (
substTy, substTys, substTyWith, substTysWith, substTheta,
substTyAddInScope,
substTyUnchecked, substTysUnchecked, substThetaUnchecked,
- substTyWithBindersUnchecked, substTyWithUnchecked,
+ substTyWithUnchecked,
substCoUnchecked, substCoWithUnchecked,
substTyVarBndr, substTyVar, substTyVars,
cloneTyVarBndr, cloneTyVarBndrs, lookupTyVar,
More information about the ghc-commits
mailing list