[commit: ghc] master: Fix a typo in the note name in comments (45fd83b)

git at git.haskell.org git at git.haskell.org
Wed Jan 27 09:55:03 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/45fd83bb5ed3a66320eb873039b65566f53ed36a/ghc

>---------------------------------------------------------------

commit 45fd83bb5ed3a66320eb873039b65566f53ed36a
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Wed Jan 27 01:55:52 2016 -0800

    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


>---------------------------------------------------------------

45fd83bb5ed3a66320eb873039b65566f53ed36a
 compiler/coreSyn/CoreLint.hs |  2 +-
 compiler/types/TyCoRep.hs    | 12 ++++++------
 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 6546c3d..9c61b39 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 a247725..08d3b79 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 c6d51f3..0b51f5d 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!



More information about the ghc-commits mailing list