diff options
author | Bartosz Nitka <niteria@gmail.com> | 2016-01-27 01:55:52 -0800 |
---|---|---|
committer | Bartosz Nitka <niteria@gmail.com> | 2016-01-27 01:56:05 -0800 |
commit | 45fd83bb5ed3a66320eb873039b65566f53ed36a (patch) | |
tree | 1833d390d367cdda71f54fe7312b576cea8385d3 | |
parent | 44a5d51a4892b85c7eba09dcb90ca02245637812 (diff) | |
download | haskell-45fd83bb5ed3a66320eb873039b65566f53ed36a.tar.gz |
Fix a typo in the note name in comments
This is `subsititution` to `substitution`, plus one instance of
the note that I missed.
Test Plan: docufix
Reviewers: simonpj, bgamari, austin, goldfire
Reviewed By: simonpj, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1856
GHC Trac Issues: #11371
-rw-r--r-- | compiler/coreSyn/CoreLint.hs | 2 | ||||
-rw-r--r-- | compiler/types/TyCoRep.hs | 12 | ||||
-rw-r--r-- | compiler/types/Type.hs | 3 |
3 files changed, 8 insertions, 9 deletions
diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs index 6546c3d38e..9c61b39fb4 100644 --- a/compiler/coreSyn/CoreLint.hs +++ b/compiler/coreSyn/CoreLint.hs @@ -788,7 +788,7 @@ lintTyApp fun_ty arg_ty ; in_scope <- getInScope -- substTy needs the set of tyvars in scope to avoid generating -- uniques that are already in scope. - -- See Note [The subsititution invariant] in TyCoRep + -- See Note [The substitution invariant] in TyCoRep ; return (substTyWithInScope in_scope [tv] [arg_ty] body_ty) } | otherwise diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs index a2477250f0..08d3b790eb 100644 --- a/compiler/types/TyCoRep.hs +++ b/compiler/types/TyCoRep.hs @@ -1416,7 +1416,7 @@ data TCvSubst -- See Note [Apply Once] -- and Note [Extending the TvSubstEnv] -- and Note [Substituting types and coercions] - -- and Note [The subsititution invariant] + -- and Note [The substitution invariant] -- | A substitution of 'Type's for 'TyVar's -- and 'Kind's for 'KindVar's @@ -1489,7 +1489,7 @@ constructor) and the CvSubstEnv should *never* map a TyVar. Furthermore, the range of the TvSubstEnv should *never* include a type headed with CoercionTy. -Note [The subsititution invariant] +Note [The substitution invariant] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When calling substTy subst ty it should be the case that the in-scope set in the substitution is a superset of both: @@ -1832,7 +1832,7 @@ substTyWithBinders bndrs tys = ASSERT( length bndrs == length 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. --- See also Note [The subsititution invariant]. +-- See also Note [The substitution invariant]. substTyAddInScope :: TCvSubst -> Type -> Type substTyAddInScope subst ty = substTy (extendTCvInScopeSet subst $ tyCoVarsOfType ty) ty @@ -1840,7 +1840,7 @@ substTyAddInScope subst ty = -- | When calling `substTy` it should be the case that the in-scope set in -- the substitution is a superset of the free vars of the range of the -- substitution. --- See also Note [The subsititution invariant]. +-- See also Note [The substitution invariant]. isValidTCvSubst :: TCvSubst -> Bool isValidTCvSubst (TCvSubst in_scope tenv cenv) = (tenvFVs `varSetInScope` in_scope) && @@ -1851,7 +1851,7 @@ isValidTCvSubst (TCvSubst in_scope tenv cenv) = -- | Substitute within a 'Type' -- The substitution has to satisfy the invariants described in --- Note [The subsititution invariant]. +-- Note [The substitution invariant]. substTy :: -- CallStack wasn't present in GHC 7.10.1, disable callstacks in stage 1 @@ -1880,7 +1880,7 @@ substTy subst@(TCvSubst in_scope tenv cenv) ty -- | Substitute within a 'Type' disabling the sanity checks. -- The problems that the sanity checks in substTy catch are described in --- Note [The subsititution invariant]. +-- 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. substTyUnchecked :: TCvSubst -> Type -> Type diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs index c6d51f35f6..0b51f5d928 100644 --- a/compiler/types/Type.hs +++ b/compiler/types/Type.hs @@ -297,8 +297,7 @@ coreView (TyConApp tc tys) | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc t = Just (mkAppTys (substTy (mkTopTCvSubst tenv) rhs) tys') -- The free vars of 'rhs' should all be bound by 'tenv', so it's -- ok to use 'substTy' here. - -- See also Note [Generating the in-scope set for a substitution] - -- in TyCoRep. + -- See also Note [The substitution invariant] in TyCoRep. -- Its important to use mkAppTys, rather than (foldl AppTy), -- because the function part might well return a -- partially-applied type constructor; indeed, usually will! |