summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2016-03-21 05:33:44 -0700
committerBartosz Nitka <niteria@gmail.com>2016-03-21 05:34:00 -0700
commitc37a583fb9059053f83f1ab0c3cb7eb7047b1a31 (patch)
tree46cb439c8b81b550fc12b322bc6f0fe1d9209920 /compiler
parent2cb55772c5359e5d71d34e5d42a4a7deb6a5d3db (diff)
downloadhaskell-c37a583fb9059053f83f1ab0c3cb7eb7047b1a31.tar.gz
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
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcType.hs2
-rw-r--r--compiler/types/TyCoRep.hs26
-rw-r--r--compiler/types/Type.hs2
3 files changed, 4 insertions, 26 deletions
diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs
index 5b37a0087f..cf3b317d44 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 6fe1ce3668..9a2036a79d 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 a3efac0250..f7aea67529 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,