[commit: ghc] ghc-8.0: Fix a typo in the note name in comments (4f383ee)

git at git.haskell.org git at git.haskell.org
Wed Jan 27 12:05:48 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/4f383ee0b75cbf982ff86ba2a38b1d3ebbb417f6/ghc

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

commit 4f383ee0b75cbf982ff86ba2a38b1d3ebbb417f6
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
    
    (cherry picked from commit 45fd83bb5ed3a66320eb873039b65566f53ed36a)


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

4f383ee0b75cbf982ff86ba2a38b1d3ebbb417f6
 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 5702f93..43dbdaa 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 b80ee06..fb30b52 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -1388,7 +1388,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
@@ -1461,7 +1461,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:
@@ -1804,7 +1804,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
@@ -1812,7 +1812,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) &&
@@ -1823,7 +1823,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
@@ -1852,7 +1852,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 0d25045..be5b375 100644
--- a/compiler/types/Type.hs
+++ b/compiler/types/Type.hs
@@ -303,8 +303,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